Skip to content

Commit

Permalink
feat: re-add non-root docker user #207
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousm4x committed Sep 18, 2023
1 parent ec01f35 commit b67933a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ WORKDIR /app
RUN wget https://github.com/seriousm4x/UpSnap/releases/download/${VERSION}/UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\
unzip UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\
rm -f UpSnap_${VERSION}_${BUILDX_ARCH}.zip &&\
chmod +x upsnap
chmod +x upsnap &&\
apk update &&\
apk add --no-cache libcap &&\
setcap 'cap_net_raw=+ep' ./upsnap

FROM alpine:3
RUN apk update &&\
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ COPY backend/ .
COPY --from=node /app/build ./pb_public
ENV CGO_ENABLED=0
RUN go build -o upsnap main.go &&\
chmod +x upsnap
chmod +x upsnap &&\
apk update &&\
apk add --no-cache libcap &&\
setcap 'cap_net_raw=+ep' ./upsnap

FROM alpine:3
RUN apk update &&\
Expand Down

0 comments on commit b67933a

Please sign in to comment.