diff --git a/Dockerfile b/Dockerfile index ed69a04789..3a4c69c5fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,11 @@ RUN cd /go-ethereum && go mod download ADD . /go-ethereum RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth -# Pull Geth into a second stage deploy alpine container -FROM alpine:latest +# Pull Geth into a second stage deploy container +FROM scratch -RUN apk add --no-cache ca-certificates +# Add certificates for HTTPS +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp diff --git a/Dockerfile.alltools b/Dockerfile.alltools index 70ccc39825..57c2a270d6 100644 --- a/Dockerfile.alltools +++ b/Dockerfile.alltools @@ -16,10 +16,11 @@ RUN cd /go-ethereum && go mod download ADD . /go-ethereum RUN cd /go-ethereum && go run build/ci.go install -static -# Pull all binaries into a second stage deploy alpine container -FROM alpine:latest +# Pull all binaries into a second stage deploy container +FROM scratch -RUN apk add --no-cache ca-certificates +# Add certificates for HTTPS +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp diff --git a/README.md b/README.md index 77317090c1..90f9955408 100644 --- a/README.md +++ b/README.md @@ -154,8 +154,7 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the above command does. It will also create a persistent volume in your home directory for -saving your blockchain as well as map the default ports. There is also an `alpine` tag -available for a slim version of the image. +saving your blockchain as well as map the default ports. Do not forget `--http.addr 0.0.0.0`, if you want to access RPC from other containers and/or hosts. By default, `geth` binds to the local interface and RPC endpoints are not