-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
34 lines (28 loc) · 878 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
26
27
28
29
30
31
32
33
34
# Build the manager binary
FROM golang:1.23 as builder
WORKDIR /workspace
# Copy miscellaneous stuff.
COPY .git/ .git/
COPY Makefile Makefile
COPY VERSION VERSION
# Copy dependencies.
COPY go.mod go.mod
COPY go.sum go.sum
RUN make vendor
# Copy the go source.
COPY main.go main.go
COPY apis/ apis/
COPY pkg/ pkg/
COPY controllers/ controllers/
# Build.
RUN make build CGO_ENABLED=0
# Use distroless as minimal base image to package the manager binary.
# Refer to https://github.com/GoogleContainerTools/distroless for more details.
FROM gcr.io/distroless/static:nonroot
LABEL source_repository="https://github.com/sapcc/digicert-issuer"
LABEL org.opencontainers.image.source="https://github.com/sapcc/digicert-issuer"
WORKDIR /
COPY --from=builder /workspace/bin/digicert-issuer .
USER nonroot:nonroot
RUN ["/digicert-issuer", "--version"]
ENTRYPOINT ["/digicert-issuer"]