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

DockerPushImage does not support multi-tags #638

Closed
leialexisjiang opened this issue Jul 31, 2018 · 2 comments
Closed

DockerPushImage does not support multi-tags #638

leialexisjiang opened this issue Jul 31, 2018 · 2 comments
Assignees
Labels

Comments

@leialexisjiang
Copy link

Hello,

I need to push docker images with multiple tags.

As no tags attribute in DockerPushImage, I have to push tag separately.

task pushLastestDockerImage(type: DockerPushImage) {
    imageName = "$dockerRegistryHost/$project.name"
    tag = "$dockerRegistryHost/$project.name:latest"
  }

task pushCurrentVersionDockerImage(type: DockerPushImage) {
    imageName = "$dockerRegistryHost/$project.name"
    tag = "$dockerRegistryHost/$project.name:$version"
}

task pushDockerImage() {
    dependsOn pushCurrentVersionDockerImage, pushLastestDockerImage
}

Is that possible to add tags in DockerPushImage just like DockerBuildImage
http://bmuschko.github.io/gradle-docker-plugin/api/com/bmuschko/gradle/docker/tasks/image/DockerPushImage.html

Thanks
Regards

@orzeh orzeh self-assigned this Jul 31, 2018
@orzeh
Copy link
Collaborator

orzeh commented Jul 31, 2018

@leialexisjiang each task of this plugin represents single Docker API call and because Docker API doesn't support pushing multiple tags in one request there is no tags property in DockerPushImage.

Please see also #598 and #505

@orzeh orzeh added the question label Jul 31, 2018
@leialexisjiang
Copy link
Author

leialexisjiang commented Aug 1, 2018

@orzeh ok this makes senses, thx for your quick answers.

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

2 participants