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

Seperate registry handling for pull and push #351

Closed
rhuss opened this issue Dec 8, 2015 · 0 comments
Closed

Seperate registry handling for pull and push #351

rhuss opened this issue Dec 8, 2015 · 0 comments
Labels
Milestone

Comments

@rhuss
Copy link
Collaborator

rhuss commented Dec 8, 2015

Currently we can provide only a single registry via configuration or system properties. However there are use case for which a pull and and a push can occur as a result of a single mvn call. E.g. mvn docker:build docker:push could potentially autopull base images for a registry A and push the resulting images to registry B.

This also implies that there can be two different set of authentication credentials are required, or maybe if no credentials at all.

In practice this is not so much an issue because authentication configuration comes from settings.xml or ~/.docker/config.json where multiple authentication specs can be stored (and looked up by registry). Also for pulling images which don't require an authentication but the (correct) authentication is send nevertheless doesn't harm (although not needed).

But for auth props given on the command line there is currently only one set which can be used (docker.username and docker.password) and its not clear whether it should be used for pull or push (albeit push is more likely of course).

Suggestion is:

  • Introduce a property docker.noAuthentication with values pull, push or all
  • Introduce a properties docker.pull.username and docker.pull.password (same for push) which overrides docker.username and docker.password if given. The latter are still used as default.

This issue was first mentioned in #147 . This is the followup issue.

Any opinions on this ?

@rhuss rhuss added this to the 0.14.0 milestone Dec 8, 2015
@rhuss rhuss added the feature label Dec 8, 2015
rhuss added a commit that referenced this issue Jan 21, 2016
Registries can now be specified with 'docker.pull.registry' and 'docker.push.registry' (with a fallback 'docker.registry') as properties (or '<pullRegistry>' and '<pushRegistry>' in the plugin configuration.
Authentication can be specified also separately with 'docker.pull.username' / 'docker.push.username', ... and within the configuration in '<authConfig><push><username>...</username></push></authConfig' ....

Also added support autopulling and authentication of base images included in dockerfiles when 'dockerFileDir' is used. This fixes #358.
rhuss added a commit that referenced this issue Jan 21, 2016
@rhuss rhuss modified the milestones: 0.13.8, 0.14.0 Jan 21, 2016
@rhuss rhuss closed this as completed Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant