mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-11 02:52:56 +01:00
Fix Kaniko image by creating a root user
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
d661bc18ae
commit
c80666a3a9
1 changed files with 12 additions and 1 deletions
|
|
@ -1,5 +1,16 @@
|
||||||
FROM gcr.io/kaniko-project/executor:debug-v1.3.0 AS kaniko
|
FROM gcr.io/kaniko-project/executor:debug-v1.3.0 AS kaniko
|
||||||
|
|
||||||
FROM alpine/git
|
FROM alpine/git
|
||||||
COPY --from=kaniko /kaniko/executor /kaniko/
|
|
||||||
|
# See https://github.com/GoogleContainerTools/kaniko/blob/master/deploy/Dockerfile#L65-L70
|
||||||
|
COPY --from=kaniko /kaniko/ /kaniko/
|
||||||
|
COPY --from=kaniko /etc/nsswitch.conf /etc/nsswitch.conf
|
||||||
|
|
||||||
|
ENV HOME /root
|
||||||
|
ENV USER root
|
||||||
|
ENV PATH /usr/local/bin:/kaniko
|
||||||
|
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"]
|
ENTRYPOINT ["/kaniko/executor"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue