-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (20 loc) · 762 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (20 loc) · 762 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
# ceedless — multi-stage build: compile CLI with Go, deploy on slim runtime.
# Total image ≈ 150 MB (debian-slim + gcc + gcovr + static Go binary).
FROM golang:1.22-bookworm AS cli-builder
WORKDIR /src
COPY cli/ ./cli/
RUN cd cli && \
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /out/ceedless .
FROM debian:stable-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc libc6-dev make gcovr ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Framework sources are read by the CLI at runtime.
COPY include /opt/ceedless/include
COPY src /opt/ceedless/src
COPY --from=cli-builder /out/ceedless /usr/local/bin/ceedless
ENV CEEDLESS_HOME=/opt/ceedless
ENV CC=gcc
WORKDIR /work
CMD ["ceedless", "test"]