diff --git a/cmd/image-builder/images/kaniko/Dockerfile b/cmd/image-builder/images/kaniko/Dockerfile index 37b41720e2a6..972950347de8 100644 --- a/cmd/image-builder/images/kaniko/Dockerfile +++ b/cmd/image-builder/images/kaniko/Dockerfile @@ -1,5 +1,12 @@ +FROM europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20231128-9bb59ac6 AS builder + +WORKDIR / +COPY . /app/ +RUN cd /app/cmd/image-builder && CGO_ENABLED=0 go build -o /app/image-builder -a -ldflags '-extldflags "-static"' . + + FROM gcr.io/kaniko-project/executor:v1.14.0 -COPY ./image-builder /image-builder +COPY --from=builder /app/image-builder /image-builder ENTRYPOINT ["/image-builder"] diff --git a/images/image-builder/Dockerfile b/images/image-builder/Dockerfile deleted file mode 100644 index 9fe74d8e3bfd..000000000000 --- a/images/image-builder/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20231128-9bb59ac6 AS builder - -COPY ../.. /app/ -RUN cd /app/cmd/image-builder && CGO_ENABLED=0 go build -o /app/image-builder -a -ldflags '-extldflags "-static"' . - - -FROM gcr.io/kaniko-project/executor:v1.14.0 - -COPY --from=builder /app/image-builder /image-builder - -ENTRYPOINT ["/image-builder"]