-
Notifications
You must be signed in to change notification settings - Fork 642
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
Registry authentication config in settings.xml #146
Comments
You are absolutely right, that shouldn't be the case. Sorry that I missed that issue (was busy lately but now after I have switched jobs I have more time to spend on this). In fact the authentication info must be looked up from the registry provided (not only when specified as part of the name). |
As mentioned in elsewhere:
Would there be a 0.12.0-SNAPSHOT to test this on, I could try if it works for me now? |
Thanks ! I will push a 0.11.5-SNAPSHOT today with this fix and will let you know when I pushed it. |
I just made a release 0.11.5-M1 available from Maven central. It would be awesome if you could check this out. I believe that most of the registry issues are fixed and should now work as described in the documentation. I will go through the issue and check them one-by-one. Please let me know, whether this release works for you. A final 0.11.5 shouldn't be far away. |
Tested this and it appears to be fixed. Thank you! Would it be worth a new issue that the error message is so horribly undescriptive when there's no (correct) credentials in
|
I think the error message are nowadays better. At least with a docker daemon 1.6.1 they final report back an "Authentication error". On what version of Docker do you receive this dumb error message ? |
I'm seeing the "Authentication error" on newer installs, should be good. |
Prior to this change, a mojo configuration like ``` <resource> <directory>some/directory</directory> <targetPath>/data</targetPath> </resource> ``` would generate an `ADD /data /data` instruction but the `some/directory` directory is never copied into the Docker build context directory, so the actual build will fail. With this change, the directory is copied to the build context directory. Note: it might seem weird that the `targetPath` is used as the directory name to use *inside* the build context as opposed to just the target path inside the container, but this is to mirror behavior when copying individual files. Fixes fabric8io#146.
When setting server credentials in
settings.xml
theid
of the server is needed. Theid
of the registry is taken from the image name, seeAuthConfigFactory.getRegistryFromImageNameOrDefault
. If the image name does not include the registry, this method will always returnregistry.hub.docker.io
, regardless of what's given in<registry>
elements (either for the image or globally). I think this is wrong. My registry happens to besomething-else
, but<server> ... <id>something-else</id> ...
in mysettings.xml
is subsequently ignored (as it is searching forregistry.hub.docker.io
.I can work around this by using
<id>registry.hub.docker.io</id>
in mysettings.xml
, but that's flawed (I see at least the risk of inadvertently offering my private credentials, while contacting the public Docker Registry.The text was updated successfully, but these errors were encountered: