mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
Dockerfile*: default non-privileged user
This commit is contained in:
parent
42628ba7ed
commit
2d53be8387
3 changed files with 12 additions and 2 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ Specifying the `--testnet` flag however will reconfigure your Geth instance a bi
|
|||
`geth attach <datadir>/testnet/geth.ipc`. Windows users are not affected by this.
|
||||
* Instead of connecting the main Ethereum network, the client will connect to the test network,
|
||||
which uses different P2P bootnodes, different network IDs and genesis states.
|
||||
|
||||
|
||||
*Note: Although there are some internal protective measures to prevent transactions from crossing
|
||||
over between the main network and test network, you should make sure to always use separate accounts
|
||||
for play-money and real-money. Unless you manually move accounts, Geth will by default correctly
|
||||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue