-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Honour DOCKER_CONFIG location for jib credentials #27460
Comments
/cc @geoand |
This is not true, see this. Are you seeing an issue where this does not work? |
If I'm reading it correctly, the logic in that function uses the supplied username and password if present; otherwise, it adds the credential helpers and the default Docker config.json file to the credential search path. However, it does not take into account the DOCKER_CONFIG environment variable if it is set. The upstream DefaultCredentialRetrievers does and adds a fair number of other Docker config locations. Here's some log output from an instance where the DOCKER_CONFIG environment variable is set, but it still uses the default path:
|
Thanks for the update. Fair enough, we can add support for |
Resolves: quarkusio#27460 Co-authored-by: George Gastaldi <[email protected]>
Add support for DOCKER_CONFIG env var when using Jib
Resolves: quarkusio#27460 Co-authored-by: George Gastaldi <[email protected]>
Resolves: quarkusio#27460 Co-authored-by: George Gastaldi <[email protected]> (cherry picked from commit 8b042db)
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`. (cherry picked from commit d5e2991)
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Support for DOCKER_CONFIG has been added in quarkusio#27460. However, in jib, the DOCKER_CONFIG should point to a directory containing a `config.json`, while in the quarkus implementation it must point to the `config.json` file itself. This is very confusing, especially since there is no documentation. This commit fixes the `JibProcessor`, so it behave exactly as described in the jib documentation (see https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/README.md#authentication-methods). That is, if `DOCKER_CONFIG` is set, it is expected to point to a folder with a `config.json` file. To keep backward compatibility, if `DOCKER_CONFIG` points to a file, it will be left untouched. See also `com.google.cloud.tools.jib.plugins.common.DefaultCredentialRetrievers.java`.
Description
Presently, jib looks in multiple locations for Docker registry credentials; however, the JibProcessor in Quarkus does not use the same order and only looks for
${user.home}/.docker/config.json
. Ideally the Quarkus jib processor would use the same lookup order as the upstream jib tools.Implementation ideas
Perhaps leveraging the DefaultCredentialRetrievers from the upstream project would make the most sense? I'm happy to attempt a pull request, but I'm not particularly familiar with the Quarkus coding style or project in general.
The text was updated successfully, but these errors were encountered: