Skip to content

Commit

Permalink
chore: Docker improvements
Browse files Browse the repository at this point in the history
Added a user to improve security of executing the Docker image.
  • Loading branch information
fallion committed Oct 24, 2021
1 parent 9b6b370 commit 1336946
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ FROM alpine:3.14.2
RUN apk add --no-cache --virtual=.run-deps ca-certificates git &&\
mkdir /app

RUN addgroup --gid 10001 --system nonroot \
&& adduser --uid 10000 --system --ingroup nonroot --home /home/nonroot nonroot

RUN apk add --no-cache tini

WORKDIR /app
COPY --from=builder /app/build/release-notary ./release-notary

RUN ln -s $PWD/release-notary /usr/local/bin

CMD [ "release-notary", "publish" ]
USER nonroot

ENTRYPOINT ["/sbin/tini", "--", "release-notary" ]

CMD [ "publish" ]

0 comments on commit 1336946

Please sign in to comment.