Dockerfile 651 B

12345678910111213141516171819202122
  1. # Build Geth in a stock Go builder container
  2. FROM golang:1.15-alpine as builder
  3. RUN apk add --no-cache make gcc musl-dev linux-headers git bash
  4. # Temporarily pull a custom Go bundle
  5. ADD https://golang.org/dl/go1.15.5.src.tar.gz /tmp/go.tar.gz
  6. RUN (cd /tmp && tar -xf go.tar.gz)
  7. RUN (cd /tmp/go/src && ./make.bash)
  8. ENV PATH="/tmp/go/bin:${PATH}"
  9. ADD . /go-ethereum
  10. RUN cd /go-ethereum && make geth
  11. # Pull Geth into a second stage deploy alpine container
  12. FROM alpine:latest
  13. RUN apk add --no-cache ca-certificates curl jq tini
  14. COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
  15. EXPOSE 8545 8546 8547 30303 30303/udp
  16. ENTRYPOINT ["geth"]