-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing '.docker' folder in release 0.20.0 break backward compatibility in some pipelines #1227
Comments
Is the new procedure on v0.20.0? Gitlab runners don't automount .docker |
@gfvirga You can just update your script to create the directory. script:
# @see https://github.com/GoogleContainerTools/kaniko/issues/1227
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --build-arg=NPM_TOKEN --cache=true --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_PIPELINE_ID.$CI_COMMIT_SHA
but yes, this is a breaking change. |
also, if the command for auth is using them error apprises like that
|
The official GitLab documentation shows an example that is broken since v0.20.0. I opened a pull-request that should fix that. |
Fixes #1227 - Readded the /kaniko/.docker directory
So to be clear the official fix for this is to create the directory? This will not be fixed with v0.21.0 ? |
@webmutation: as far as I understand the MR #1230 has re-added the folder by default. Probably the 0.21.0 will again have the |
Ok. I saw the commit. I did not notice it was already released. Thanks for the fb |
- Also ensure `/docker/.kaniko` directory exists - see: GoogleContainerTools/kaniko#1227
Actual behavior
My CI/CD (gitlab) image build job looks like this:
This raises an error during the config file creation:
After entering the image there is no
/kaniko/.docker
folder as expected (as of v0.19.0).Tested with:
gcr.io/kaniko-project/executor:debug-v0.19.0
gcr.io/kaniko-project/executor:debug-v0.20.0
Expected behavior
/kaniko/.docker
folder exists.To reproduce
Steps to reproduce the behavior:
docker run -it --rm --entrypoint="" gcr.io/kaniko-project/executor:debug-v0.19.0 sh
ls -ail /kaniko
.docker
should existdocker run -it --rm --entrypoint="" gcr.io/kaniko-project/executor:debug-v0.20.0 sh
ls -ail /kaniko
you should note there is no more.docker
folderThe text was updated successfully, but these errors were encountered: