-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 840 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 840 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
# ---- build stage ----
FROM gcc:14 AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
ninja-build \
libhpdf-dev \
libpugixml-dev \
nlohmann-json3-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF
RUN cmake --build build --target docraft_tool --config Release -j "$(nproc)"
# ---- runtime stage ----
FROM debian:trixie-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libhpdf-2.3.0 \
libpugixml1v5 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/build/artifacts/bin/docraft_tool /usr/local/bin/docraft_tool
ENTRYPOINT ["/usr/local/bin/docraft_tool"]