Fix fix the dockerfile if you fix you fix otherwise idk
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Hamcha 2022-03-25 20:47:12 +01:00
parent da6f91b58b
commit ef3e6a40f0
Signed by: hamcha
GPG key ID: 1669C533B8CF6D89

View file

@ -21,16 +21,13 @@ RUN CGO_ENABLED=0 go build \
-o /app .
# STAGE 2: build the container to run
FROM scratch AS final
FROM gcr.io/distroless/static AS final
LABEL maintainer="gbaeke"
COPY --from=build /app /app
USER nonroot:nonroot
# copy ca certs
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
# copy users from builder (use from=0 for illustration purposes)
COPY --from=0 /etc/passwd /etc/passwd
USER myapp
# copy compiled app
COPY --from=build --chown=nonroot:nonroot /app /app
# run binary; use vector form
ENTRYPOINT ["/app"]