FROM gcr.io/kaniko-project/executor:v1.7.0-debug AS kaniko-src # Issue with kaniko which cannot copy files called kaniko: # https://github.com/GoogleContainerTools/kaniko/issues/960#issuecomment-573160390 RUN cp -r /kaniko /kaniko-dist FROM alpine/git # See https://github.com/GoogleContainerTools/kaniko/blob/master/deploy/Dockerfile#L65-L70 COPY --from=kaniko-src /kaniko-dist/ /kaniko/ COPY --from=kaniko-src /etc/nsswitch.conf /etc/nsswitch.conf ENV HOME /root ENV USER root 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 ENTRYPOINT ["/kaniko/executor"]