fixed nonroot

This commit is contained in:
ston1th 2020-02-01 18:01:21 +01:00
commit b8f835eb3a
3 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
FROM golang:alpine as builder
RUN adduser -D -g '' appuser
RUN adduser -D -g 65532 -u 65532 appuser
RUN mkdir /build
ADD . /build/
WORKDIR /build
@ -10,5 +10,5 @@ COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem
COPY --from=builder /build/main /main
USER appuser
EXPOSE 8080
EXPOSE 8443
ENTRYPOINT ["/main"]