gitee.com/liu-zhao234568/cntest@v1.0.0/Dockerfile.alltools (about) 1 # Support setting various labels on the final image 2 ARG COMMIT="" 3 ARG VERSION="" 4 ARG BUILDNUM="" 5 6 # Build Geth in a stock Go builder container 7 FROM golang:1.16-alpine as builder 8 9 RUN apk add --no-cache gcc musl-dev linux-headers git 10 11 ADD . /go-ethereum 12 RUN cd /go-ethereum && go run build/ci.go install 13 14 # Pull all binaries into a second stage deploy alpine container 15 FROM alpine:latest 16 17 RUN apk add --no-cache ca-certificates 18 COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ 19 20 EXPOSE 8545 8546 30303 30303/udp 21 22 # Add some metadata labels to help programatic image consumption 23 ARG COMMIT="" 24 ARG VERSION="" 25 ARG BUILDNUM="" 26 27 LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"