Dockerfile.standalone 519 B

123456789101112131415161718
  1. # This version of Dockerfile is for building without external dependencies.
  2. FROM golang:1.18-alpine AS builder
  3. ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
  4. WORKDIR /app
  5. # Avoid invalidating the `go mod download` cache when only code has changed.
  6. COPY go.mod go.sum /app/
  7. RUN go mod download
  8. COPY . /app/
  9. RUN go build -o external-secrets main.go
  10. FROM gcr.io/distroless/static AS app
  11. COPY --from=builder /app/external-secrets /bin/external-secrets
  12. # Run as UID for nobody
  13. USER 65534
  14. ENTRYPOINT ["/bin/external-secrets"]