-
Bug
-
Resolution: Done
-
Major
-
4.4.0.Final
-
6
-
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
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)
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.