Skip to content

Commit

Permalink
Dockerfile: use non-privileged user account (ethereum#16052)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez authored and kimmyeonghun committed Jul 2, 2018
1 parent e383e1e commit 0e40cbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-esn/build/bin/gesn /usr/local/bin/

RUN addgroup -g 1000 gesn && \
adduser -h /root -D -u 1000 -G gesn gesn && \
chown gesn:gesn /root

USER gesn

EXPOSE 9545 9546 50505 50505/udp 50506/udp
ENTRYPOINT ["gesn"]
6 changes: 6 additions & 0 deletions Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-esn/build/bin/* /usr/local/bin/

RUN addgroup -g 1000 gesn && \
adduser -h /root -D -u 1000 -G gesn gesn \
chown gesn:gesn /root

USER gesn

EXPOSE 9545 9546 50505 50505/udp 50506/udp

0 comments on commit 0e40cbb

Please sign in to comment.