Dockerfile 598 B

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