Pushing a docker image into Artifactory via the publishing mechanism in gradle

We are using the Gradle Artifactory Plugin to publish artifacts into our Artifactory server (see also these instructions).

Now we have added tasks into our Gradle scripts to build Docker images and we want to push these images into our Artifactory (which we have configured as a Docker repository).

  • Docker /bin/bash: nodemon: command not found
  • When running Docker on Raspberry Pi starting containers fails from time to time
  • Unable to install node 7.5.0
  • Run a Docker Image as a Container
  • Capturing output of python script run inside a docker container
  • Compatability of Dockerfile RUN Commands Cross-OS (apt-get)
  • I’ve managed to do this using custom tasks but I would really like to plug this into our current workflow so that gradle artifactoryPublish does this at the same time that it uploads our other artifacts into the repository. The main benefit of doing this would be that the publishing mechanism makes sure that all modules build successfully before pushing and I would like to tap into that.

    So does anybody know what the best way is to plug docker push into the artifactoryPublish task that comes with the Gradle Artifactory Plugin?

  • dotnet core web api CI/CD pipeline with docker container
  • Installing mongoimport in a docker image
  • Docker containers shut down after systemd start
  • Expose and publish a port with specified host port number inside Dockerfile
  • How to deploy mongoDB Docker image to Elastic Beanstalk?
  • How to atomically update a counter shared between Docker instances
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.