In this exercise, we are going to learn how to publish Docker images to a private Nexus repository with the help of the Maven Jib plugin. Until recently, you had to install the Docker daemon on the box from where you want to generate Docker images. The Jib plugin allows you to build the Docker image without installing Docker daemon. This is important for build machines using task managers like Jenkins and Teamcity, as setting up Docker is another extraneous step.

There are certain occasions during which you may want to publish your images into a private repository instead of a public repository like Dockerhub. The Nexus repository manager comes into the picture here as it can host all types of artifacts starting from jar, Docker images, npm packages, and more. This exercise assumes you have basic knowledge about Docker and repositories. We will first set up the Nexus repository on a local box followed by setting up the build process to publish the image to the same nexus repository.

Leave a Reply

Your email address will not be published. Required fields are marked *