mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-11 11:02:55 +01:00
28 lines
909 B
Docker
28 lines
909 B
Docker
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 gcr.io/go-containerregistry/crane as crane
|
|
|
|
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
|
|
|
|
RUN apk add --no-cache jq
|
|
COPY --from=crane /ko-app/crane /usr/local/bin/crane
|
|
|
|
# Copy entry point
|
|
COPY entry_point.sh /root/entry_point.sh
|
|
|
|
ENTRYPOINT ["/root/entry_point.sh"]
|