-
Notifications
You must be signed in to change notification settings - Fork 38
/
Dockerfile
25 lines (21 loc) · 605 Bytes
/
Dockerfile
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
FROM --platform=$BUILDPLATFORM golang:1.21 AS builder
ARG TARGETOS TARGETARCH
WORKDIR /workspace
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
COPY apis/ apis/
COPY cmd/ cmd/
COPY generated/ generated/
COPY image/ image/
COPY k8sutils/ k8sutils/
COPY labeller/ labeller/
COPY prometheus/ prometheus/
COPY secscan/ secscan/
COPY Makefile Makefile
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH make build
FROM alpine:3.10
WORKDIR /
RUN apk add --no-cache ca-certificates
COPY --from=builder /workspace/bin/security-labeller /bin/security-labeller
ENTRYPOINT ["/bin/security-labeller"]