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

docker registry option no longer works properly after 0.13.0 when performing a push #261

Open
mwringe opened this issue Aug 13, 2015 · 5 comments

Comments

@mwringe
Copy link

mwringe commented Aug 13, 2015

There are issues when using the docker maven plugin after 0.13.0 when the -Ddocker.registry option is used when pushing an image.

In versions including at least 0.12.0 and 0.13.0, using -Ddocker.registry=docker.io would work properly.

After this version, the following error would occur:

[INFO] DOCKER> ... The push refers to a repository [docker.io/mwringe/hawkular-cassandra](len: 1)
[ERROR] DOCKER> Repository does not exist: docker.io/mwringe/hawkular-cassandra
[ERROR] DOCKER> Repository does not exist: docker.io/mwringe/hawkular-cassandra

Note that when -Ddocker.registry is not included as a build option, it was still defaulting to docker.io (if that was the default configured for the system)

@rhuss
Copy link
Collaborator

rhuss commented Aug 18, 2015

Could you please give me some more background information ? (I remember we talked about this last week but I lost the reference):

  • What operating system in which version is you Docker host running on ?
  • Can I reproduce this by myself ? (i.e. do you have a pom.xml for me) ?

@mwringe
Copy link
Author

mwringe commented Aug 18, 2015

@rhuss
Copy link
Collaborator

rhuss commented Aug 18, 2015

Good news, I can reproduce the issue. I'm pretty sure, we can fix this, but it's not a no brainer. I already quite some hard time with Fedora's (asymmetric) way of the docker image name handling. E.g. see this issue which is still open.

Please also note that the possibility to choose a registry with a system property is a feature of the plugin, since Docker doesn't provide this out of the box. For docker, the registry is a part of the name (which IMO is a misconception because the registry is some meta date while the name is often used as ID).

So when -Ddocker.registry=docker.io is given, the plugin has to do:

  • Check whether an image with the name docker.io/.... exists
  • If not, create a temporary tag docker.io/....
  • Make a push for this temporary tag docker.io/...
  • Remove the temporary tag

But because for Fedora says in the check the image exists but then complains for the push (see the bug above), its not that easy.

@rhuss
Copy link
Collaborator

rhuss commented Aug 19, 2015

The push thingy will be fixed for Fedora's rhatdan/moby1#111 + a fix in 0.13.4 within this plugin.

@jgangemi
Copy link
Collaborator

thingy - very technical :)

rhuss added a commit that referenced this issue Aug 19, 2015
This is related to #261, but still has to be tested.
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

No branches or pull requests

3 participants