You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You do not hit this bug if you use the default value of the DOCKER_CONFIG environment variable, which is the same as the static string used by the file existence check.
Since the PR introducing this behavior was introduced after the 0.19.0 release, it does not have this bug.
Expected behavior
I expect kaniko to respect non-default values for the DOCKER_CONFIG environment variable and not overwrite existing Docker configuration files.
To Reproduce
Steps to reproduce the behavior:
Run kaniko providing a Docker configuration file with static credentials for gcr.io at a location other than /kaniko/.docker/config.json
Additional Information
Dockerfile
Any Dockerfile will work, it doesn't get far enough to load it.
Build Context
An empty build context should suffice to reproduce.
Kaniko Image (fully qualified with digest)
gcr.io/kaniko-project/executor:debug-v0.20.0 d621600b36f824058cf45f783406a77c37fd457ed079be2fa1ff6b2eae5437e1
Triage Notes for the Maintainers
Description
Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
The text was updated successfully, but these errors were encountered:
ddgenome
pushed a commit
to ddgenome/kaniko
that referenced
this issue
May 4, 2020
If the DOCKER_CONFIG environment variable is set, use it when
determining if the Docker config file exists. Fall back to kaniko
default if it the DOCKER_CONFIG environment variable is not set.
FixesGoogleContainerTools#1228
Actual behavior
The recently merged Add ability to use public GCR repos without being authenticated #1140 does not respect the
DOCKER_CONFIG
environment variable, causing the check for existence of the Docker config to report that the file does not exist, resulting in the execution of thedocker-credential-gcr
executable, which does respect theDOCKER_CONFIG
environment variable and therefore overwrites the existing file at the location specified by theDOCKER_CONFIG
environment variable. If you have static credentials for GCR in that existing Docker config file, then this bug breaks authentication to GCR, as the presence of a gcr.io credHelpers property supersedes the static credentials.You do not hit this bug if you use the default value of the
DOCKER_CONFIG
environment variable, which is the same as the static string used by the file existence check.Since the PR introducing this behavior was introduced after the 0.19.0 release, it does not have this bug.
Expected behavior
I expect kaniko to respect non-default values for the
DOCKER_CONFIG
environment variable and not overwrite existing Docker configuration files.To Reproduce
Steps to reproduce the behavior:
/kaniko/.docker/config.json
Additional Information
Any Dockerfile will work, it doesn't get far enough to load it.
An empty build context should suffice to reproduce.
gcr.io/kaniko-project/executor:debug-v0.20.0 d621600b36f824058cf45f783406a77c37fd457ed079be2fa1ff6b2eae5437e1
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: