-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 970 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 970 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
# Build stage
FROM golang:1.22-bookworm AS builder
WORKDIR /src
COPY go.mod ./
RUN go mod download || true
COPY . .
# Build pipeline binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o /out/pipeline ./cmd/pipeline
# Install pinned book snapshot tools into /out/bin
RUN mkdir -p /out/bin && \
GOBIN=/out/bin CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go install github.com/nicholaskarlson/proof-first-recon/cmd/recon@book-v1 && \
GOBIN=/out/bin CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go install github.com/nicholaskarlson/proof-first-auditpack/cmd/auditpack@book-v1
# Runtime stage (no package manager, includes CA certs)
FROM gcr.io/distroless/base-debian12
COPY --from=builder /out/pipeline /usr/local/bin/pipeline
COPY --from=builder /out/bin/recon /usr/local/bin/recon
COPY --from=builder /out/bin/auditpack /usr/local/bin/auditpack
ENTRYPOINT ["/usr/local/bin/pipeline"]
EXPOSE 8080
CMD ["server"]