github.com/GoogleContainerTools/skaffold@v1.39.18/examples/getting-started/Dockerfile (about)

     1  FROM golang:1.15 as builder
     2  COPY main.go .
     3  # `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations
     4  ARG SKAFFOLD_GO_GCFLAGS
     5  RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go
     6  
     7  FROM alpine:3
     8  # Define GOTRACEBACK to mark this container as using the Go language runtime
     9  # for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
    10  ENV GOTRACEBACK=single
    11  CMD ["./app"]
    12  COPY --from=builder /app .