hydra-maester/.docker/Dockerfile-kubebuilder

18 lines
407 B
Plaintext
Raw Normal View History

2024-06-24 11:15:21 +02:00
FROM golang:1.22 as builder
WORKDIR /go/src/app
ENV PATH=$PATH:/go/src/app/.bin
COPY . .
RUN make test &&\
make manager
# 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
WORKDIR /
COPY --from=builder /go/src/app/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]