Fix fix the dockerfile if you fix you fix otherwise idk
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
da6f91b58b
commit
ef3e6a40f0
1 changed files with 6 additions and 9 deletions
15
Dockerfile
15
Dockerfile
|
@ -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"]
|
Loading…
Reference in a new issue