diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 0e9187d9f..e3b1c55a3 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -62,7 +62,8 @@ jobs: uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main with: name: function-buildless-controller - dockerfile: components/buildless-serverless/Dockerfile + dockerfile: Dockerfile + context: components/buildless-serverless tags: ${{ needs.compute-tags.outputs.tags }} build-serverless-webhook: diff --git a/components/buildless-serverless/Dockerfile b/components/buildless-serverless/Dockerfile index 4ba18b68c..b92b036d8 100644 --- a/components/buildless-serverless/Dockerfile +++ b/components/buildless-serverless/Dockerfile @@ -3,7 +3,7 @@ FROM golang:1.22 AS builder ARG TARGETOS ARG TARGETARCH -WORKDIR /workspace +WORKDIR /workdir # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum @@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM gcr.io/distroless/static:nonroot WORKDIR / -COPY --from=builder /workspace/manager . +COPY --from=builder /workdir/manager . USER 65532:65532 ENTRYPOINT ["/manager"]