Update dockerfile

This commit is contained in:
2024-06-22 13:45:12 +02:00
parent dd819547ed
commit d9f64ac0ad

View File

@@ -1,14 +1,5 @@
FROM golang:1.21.6 as base
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid 65532 \
small-user
WORKDIR $GOPATH/src/app/
COPY . .
@@ -27,6 +18,4 @@ COPY --from=base /etc/group /etc/group
COPY --from=base /main .
USER small-user:small-user
CMD ["/main"]