From d7673a68ab995aec1a4b54b90203cdc993743770 Mon Sep 17 00:00:00 2001 From: Piotr Halama Date: Thu, 25 Apr 2024 10:30:08 +0200 Subject: [PATCH] Prapare images to be usable in ADO build jobs --- components/operator/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/operator/Dockerfile b/components/operator/Dockerfile index b574a78bb..031900624 100644 --- a/components/operator/Dockerfile +++ b/components/operator/Dockerfile @@ -6,7 +6,7 @@ # Build the operator binary FROM golang:1.22.2 as builder -WORKDIR /workspace +WORKDIR /workdir # Copy the Go Modules manifests COPY go.mod go.sum ./ @@ -26,7 +26,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o operator ./components/o # Bumping serverless images in the values.yaml - used for building "local" and "dev" images FROM alpine:3.19.1 as replacer -WORKDIR /workspace +WORKDIR /workdir ARG PURPOSE ARG IMG_DIRECTORY @@ -52,8 +52,8 @@ RUN if [[ "local" = "$PURPOSE" ]] ; then ./hack/replace_serverless_chart_images. FROM gcr.io/distroless/static:nonroot WORKDIR / -COPY --chown=65532:65532 --from=builder /workspace/operator . -COPY --chown=65532:65532 --from=replacer /workspace/config/serverless /module-chart +COPY --chown=65532:65532 --from=builder /workdir/operator . +COPY --chown=65532:65532 --from=replacer /workdir/config/serverless /module-chart USER 65532:65532 ENTRYPOINT ["/operator"]