Skip to content

Commit

Permalink
fix(docker!): remove user
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble authored Dec 30, 2021
1 parent 78beddf commit 23039b0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ ARG GO_VERSION=1.17
## Build container
FROM golang:${GO_VERSION}-alpine AS builder

RUN mkdir /user && \
echo 'nobody:x:65534:65534:nobody:/:' > /user/passwd && \
echo 'nobody:x:65534:' > /user/group

RUN apk add --no-cache ca-certificates git zip

WORKDIR /src
Expand All @@ -20,9 +16,6 @@ RUN CGO_ENABLED=0 go build -installsuffix 'static' -o /teledock /src/cmd/teledoc
## Final container
FROM scratch AS final

COPY --from=builder /user/group /user/passwd /etc/
COPY --from=builder /teledock /teledock

USER 65534:65534

ENTRYPOINT ["/teledock"]
ENTRYPOINT ["/teledock"]

0 comments on commit 23039b0

Please sign in to comment.