gitee.com/liu-zhao234568/cntest@v1.0.0/Dockerfile (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 ./cmd/geth
    13  
    14  # Pull Geth 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/geth /usr/local/bin/
    19  
    20  EXPOSE 8545 8546 30303 30303/udp
    21  ENTRYPOINT ["geth"]
    22  
    23  # Add some metadata labels to help programatic image consumption
    24  ARG COMMIT=""
    25  ARG VERSION=""
    26  ARG BUILDNUM=""
    27  
    28  LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"