github.com/kyma-project/kyma-environment-broker@v0.0.1/Dockerfile.job (about)

     1  # Build image
     2  FROM golang:1.21.3-alpine3.18 AS build
     3  
     4  WORKDIR /go/src/github.com/kyma-project/kyma-environment-broker
     5  
     6  COPY cmd cmd
     7  COPY common common
     8  COPY internal internal
     9  COPY go.mod go.mod
    10  COPY go.sum go.sum
    11  
    12  ARG BIN
    13  RUN CGO_ENABLED=0 go build -o /bin/main ./cmd/${BIN}/main.go
    14  
    15  # Get latest CA certs
    16  FROM alpine:latest as certs
    17  RUN apk --update add ca-certificates
    18  
    19  # Final image
    20  FROM scratch
    21  LABEL source = git@github.com:kyma-project/control-plane.git
    22  
    23  COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
    24  COPY --from=build /bin/main /bin/main