github.com/theQRL/go-zond@v0.1.1/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.21-alpine as builder
     8  
     9  RUN apk add --no-cache gcc musl-dev linux-headers git
    10  
    11  # Get dependencies - will also be cached if we won't change go.mod/go.sum
    12  COPY go.mod /go-zond/
    13  COPY go.sum /go-zond/
    14  RUN cd /go-zond && go mod download
    15  
    16  ADD . /go-zond
    17  RUN cd /go-zond && go run build/ci.go install -static ./cmd/geth
    18  
    19  # Pull Geth into a second stage deploy alpine container
    20  FROM alpine:latest
    21  
    22  RUN apk add --no-cache ca-certificates
    23  COPY --from=builder /go-zond/build/bin/gzond /usr/local/bin/
    24  
    25  EXPOSE 8545 8546 30303 30303/udp
    26  ENTRYPOINT ["gzond"]
    27  
    28  # Add some metadata labels to help programatic image consumption
    29  ARG COMMIT=""
    30  ARG VERSION=""
    31  ARG BUILDNUM=""
    32  
    33  LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM"