-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 810 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (33 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Stage 1: builder
FROM rust:1.86-bookworm AS builder
RUN apt-get update && apt-get install -y \
cmake \
clang \
libclang-dev \
pkg-config \
libssl-dev \
libsqlite3-dev \
libasound2-dev \
libx11-dev \
libxtst-dev \
libxi-dev \
libleptonica-dev \
tesseract-ocr \
libtesseract-dev \
libv4l-dev \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN cargo build --release -p lifelog-server
# Stage 2: runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
libpq5 \
tesseract-ocr \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/lifelog-server /usr/local/bin/lifelog-server
EXPOSE 7182
ENTRYPOINT ["lifelog-server", "serve"]