The Docker build+publish plugin - and Dockerfile as build config

Written by: Michael Neale
2 min read

The docker team recently announced that you can have private repositories - to go along with their public index of available docker images.

In docker terms - a "repository" is what you build images into - you "push and pull" repositories from a registry. The private one means you can use it for proprietary apps.

To go along with this, I built a simple Docker Build and Publish plugin . This works nicely if you have a project with a Dockerfile in it - you can define all your build steps as a Dockerfile - and the end result is an image you can tag and publish.

Whilst Dockerfiles are usually thought of as defining how to build a linux container image (which is deployable and portable) - it will be interesting to see if people pick it up as a way to define their build, itself. In some ways - providing a Dockerfile to define your build gives you ideal portability - wherever you will run the build - you will have a consistent environment.

This plugin can store your registry credentials - allowing a push to the registry on completion.

Installing is pretty simple (as long as you have docker runnable where you builds run, of course), in a recent version of Jenkins, go to Manage Jenkins -> Manage Plugins -> Available - and search for "docker build publish" - find this plugin and install it:

Docker is one year old today (!):

Read more about this plugin.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.