github.com/google/trillian-examples@v0.0.0-20240520080811-0d40d35cef0e/clone/cmd/ctverify/Dockerfile (about)

     1  FROM golang:1.21.5-alpine3.17@sha256:92cb87af996ec6befc85f0aec27e12ead2fab396695fa8a7abff79e021e58195 AS builder
     2  
     3  ARG GOFLAGS=""
     4  ENV GOFLAGS=$GOFLAGS
     5  
     6  # Move to working directory /build
     7  WORKDIR /build
     8  
     9  # Copy and download dependency using go mod
    10  COPY go.mod .
    11  COPY go.sum .
    12  RUN go mod download
    13  
    14  # Copy the code into the container
    15  COPY . .
    16  
    17  # Build the application
    18  RUN go build ./clone/cmd/ctverify
    19  
    20  # Build release image
    21  FROM alpine:3.19.1@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
    22  
    23  COPY --from=builder /build/ctverify /bin/ctverify
    24  ENTRYPOINT ["/bin/ctverify"]