From d83eda003b6f748b798bd1fc60bf3f4d711df3f8 Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Mon, 21 Feb 2022 16:52:41 +0100 Subject: [PATCH] The final countdown, nana nananana --- kaniko/Dockerfile | 19 ++++++++++++------- kaniko/entry_point.sh | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/kaniko/Dockerfile b/kaniko/Dockerfile index 107c2a5..3f9a0b5 100644 --- a/kaniko/Dockerfile +++ b/kaniko/Dockerfile @@ -12,19 +12,24 @@ ENV HOME /root ENV USER root # See https://github.com/GoogleContainerTools/kaniko/blob/master/deploy/Dockerfile#L65-L70 -COPY --from=kaniko-src /kaniko-dist/ /kaniko-dist +COPY --from=kaniko-src /kaniko-dist/ /kaniko-dist/ COPY --from=kaniko-src /etc/nsswitch.conf /etc/nsswitch.conf -RUN apk add --no-cache jq && \ - cp -r /kaniko-dist /kaniko +ENV PATH /kaniko-dist:$PATH +ENV SSL_CERT_DIR=/kaniko-dist/ssl/certs +ENV DOCKER_CONFIG /kaniko-dist/.docker/ +ENV DOCKER_CREDENTIAL_GCR_CONFIG /kaniko-dist/.config/gcloud/docker_credential_gcr_config.json -ENV PATH /usr/local/bin:/kaniko:$PATH -ENV SSL_CERT_DIR=/kaniko/ssl/certs -ENV DOCKER_CONFIG /kaniko/.docker/ -ENV DOCKER_CREDENTIAL_GCR_CONFIG /kaniko/.config/gcloud/docker_credential_gcr_config.json +## add symlinks for kaniko +RUN ln -s /kaniko-dist/executor /kaniko-dist/kaniko-executor && \ + ln -s /kaniko-dist/warmer /kaniko-dist/kaniko-warmer +# Adding crane to the image COPY --from=crane /ko-app/crane /usr/local/bin/crane +# Adding jq to the image +RUN apk add --no-cache jq + # Copy entry point COPY entry_point.sh /root/entry_point.sh diff --git a/kaniko/entry_point.sh b/kaniko/entry_point.sh index ac19900..3c43799 100755 --- a/kaniko/entry_point.sh +++ b/kaniko/entry_point.sh @@ -4,7 +4,7 @@ if [ -z "$BUILD_IMAGE_NO_MESSAGE" ]; then echo "You are using a GitLab CI build-image with kaniko and crane" echo "You can suppress this message by setting BUILD_IMAGE_NO_MESSAGE" - /kaniko/executor version + kaniko-executor version echo "Crane version: $(crane version)" fi