Skip to content
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

fix(KanikoDir): update DOCKER_CONFIG env when use custom kanikoDir #2202

Merged
merged 3 commits into from
Aug 12, 2022

Conversation

chenggui53
Copy link
Contributor

@chenggui53 chenggui53 commented Aug 12, 2022

Description

In v1.9.0, when use custom KanikoDir, kaniko will copy all from kanikoDefauiltDir(/kaniko) to custom KanikoDir,and then remove all in KanikoDefaultDir(/kaniko), and kaniko defines DOCKER_CONFIG as /kaniko/.docker in Dockerfile. So user can't get auth if uses custom kanikoDir.
To avoid this, I added a section that updates environment variables if use custom Kaniko dir, so kaniko can get correct auth from new dir.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

Examples of user facing changes:
- kaniko adds a new flag `--registry-repo` to override registry

@google-cla
Copy link

google-cla bot commented Aug 12, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@chenggui53 chenggui53 changed the title Fix(KanikoDIr): update DOCKER_CONFIG env when user defined new KanikoDIr Fix(KanikoDIr): update DOCKER_CONFIG env when use custom kanikoDir Aug 12, 2022
@chenggui53 chenggui53 changed the title Fix(KanikoDIr): update DOCKER_CONFIG env when use custom kanikoDir fix(KanikoDIr): update DOCKER_CONFIG env when use custom kanikoDir Aug 12, 2022
@chenggui53 chenggui53 changed the title fix(KanikoDIr): update DOCKER_CONFIG env when use custom kanikoDir fix(KanikoDir): update DOCKER_CONFIG env when use custom kanikoDir Aug 12, 2022
@imjasonh imjasonh merged commit 348018d into GoogleContainerTools:main Aug 12, 2022
@chuangw6 chuangw6 mentioned this pull request Sep 26, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants