erigon-pulse/Dockerfile
Shude Li 3e6820d863 Dockerfile: unexpose port 8547 as GraphQL was merged into HTTP endpoint (#21556)
# Conflicts:
#	Dockerfile
#	Dockerfile.alltools
2020-10-06 14:12:09 +02:00

23 lines
691 B
Docker

FROM golang:1.15-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git
WORKDIR /app
# next 2 lines helping utilize docker cache
COPY go.mod go.sum ./
RUN go mod download
# https://github.com/valyala/gozstd/issues/20#issuecomment-557499034
RUN GOZSTD_VER=$(cat go.mod | fgrep github.com/valyala/gozstd | awk '{print $NF}'); cd ${GOPATH}/pkg/mod/github.com/valyala/gozstd@${GOZSTD_VER}; if [[ ! -f _rebuilt ]]; then chmod -R +w .; make -j8 clean; make -j8 libzstd.a; touch _rebuilt; fi;
ADD . .
RUN make all
FROM alpine:3
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/build/bin/* /usr/local/bin/
EXPOSE 8545 8546 30303 30303/udp 8080 9090 6060