Dockerfile*: default non-privileged user

This commit is contained in:
Federico Gimenez 2018-02-09 18:20:41 +01:00
parent 42628ba7ed
commit 2d53be8387
3 changed files with 12 additions and 2 deletions

View file

@ -12,5 +12,10 @@ FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
RUN addgroup -g 1000 geth && \
adduser -D -u 1000 -G geth geth
USER geth
EXPOSE 8545 8546 30303 30303/udp 30304/udp
ENTRYPOINT ["geth"]

View file

@ -12,4 +12,9 @@ FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
RUN addgroup -g 1000 geth && \
adduser -D -u 1000 -G geth geth
USER geth
EXPOSE 8545 8546 30303 30303/udp 30304/udp

View file

@ -123,7 +123,7 @@ $ geth --your-favourite-flags dumpconfig
One of the quickest ways to get Ethereum up and running on your machine is by using Docker:
```
docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
docker run -d --name ethereum-node -v /Users/alice/ethereum:/home/geth \
-p 8545:8545 -p 30303:30303 \
ethereum/client-go --fast --cache=512
```