-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 770 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.26-alpine@sha256:f85330846cde1e57ca9ec309382da3b8e6ae3ab943d2739500e08c86393a21b1 AS builder
# hadolint ignore=DL3018
RUN apk --no-cache add ca-certificates git
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /codeowners-validator .
FROM scratch
LABEL org.opencontainers.image.source=https://github.com/step-security/codeowners-validator
COPY --from=builder /codeowners-validator /codeowners-validator
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/bin/git /usr/bin/git
COPY --from=builder /usr/bin/xargs /usr/bin/xargs
COPY --from=builder /lib /lib
COPY --from=builder /usr/lib /usr/lib
ENTRYPOINT ["/codeowners-validator"]