]
Fred Bricon updated JBIDE-22580:
--------------------------------
Sprint: (was: devex #116 June 2016)
Deploy Docker Image wizard: Cannot push already tagged image to
docker registry
-------------------------------------------------------------------------------
Key: JBIDE-22580
URL:
https://issues.jboss.org/browse/JBIDE-22580
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: docker, openshift
Affects Versions: 4.4.0.Final
Reporter: Marián Labuda
Assignee: Xavier Coulon
Labels: deploy_docker_wizard, docker, openshift_v3
Fix For: 4.4.1.AM1
There is a CDK docker registry located at hub.openshift.rhel-cdk.10.1.2.2.xip.io. From
command line user has to tag image at first before pushing it to remote registry to match
registry URL, e.g. to push image msa/helloworld from local repository to CDK docker
registry I have to tag image as follows
hub.openshift.rhel-cdk.10.1.2.2.xip.io/msa/helloworld and then I can just push it
"docker push hub.openshift.rhel-cdk.10.1.2.2.xip.io/msa/helloworld". Users used
to command line tooling and not aware of "auto-tag" feature of OpenShift tooling
can bump into issues. When I am trying to push already tagged image (as I would be
expecting from command line) I get an error with following stack trace
{code}Failed to push the selected Docker image into OpenShift registry
org.eclipse.linuxtools.docker.core.DockerException: Conflict: Tag latest is already set
to image 2e0ddd37ace80cf13a9d3c664445430972fb3440661eb5d8efb7cc994f11bbdb, if you want to
replace it, please use -f option
at
org.eclipse.linuxtools.internal.docker.core.DockerConnection.tagImage(DockerConnection.java:1083)
at
org.jboss.tools.openshift.internal.ui.dockerutils.PushImageToRegistryJob.doRun(PushImageToRegistryJob.java:65)
at
org.jboss.tools.openshift.internal.common.core.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:37)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
{code}
I think it would be better at first try to check, whether an image does not already have
specific tag and if it does, then we should involve confirmation dialog to use force push.
If there is no such tagged image, push would behave as it is. Alternatively after checking
of image existence we could just simply ignore it, because it is being tagged on same tag.