gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

gradle push should work better

Open jomach opened this issue 8 years ago • 4 comments

Hi guys, I'm using your plugin to push images to a private docker registry. It works fine but when I build it locally the image ends up with the naming 👍 registry:port/username/dockerimage

It should strip the registry host I think... my gradle file looks like this:

`docker {

name "registry:8483/username/dockerimage:version
files tasks.distTar.outputs, rootProject.files("accumulo_docker/startup.sh")
dockerfile rootProject.file("accumulo_docker/Dockerfile")
tags "$artifactVersion"

}`

This is a problem because if I have a dockercompose file and I specify only dockerimage:version it will not find the image

jomach avatar Nov 15 '17 11:11 jomach

Why always specify the full image name including the host:port. Does that not work for you?

uschi2000 avatar Nov 15 '17 18:11 uschi2000

because if you build locally it will have that name to which is actually wrong at the moment if you build the docker images and then do docker images on your local pc you get:

registry:8483/username/dockerimage:version

and it should be: dockerimage:version

jomach avatar Nov 17 '17 14:11 jomach

The expected behavior for our workflow is to use stable names that are independent of the build location. So a local build will produce the same name and tag as a CI build, and the name is that of the upstream Docker repository. I don't think we're going to change this behavior, sorry.

uschi2000 avatar Nov 17 '17 22:11 uschi2000

I'm not refering about the naming. I'm saying that there should be a option lile: registry: serverToPush the image

jomach avatar Nov 18 '17 21:11 jomach