Fabric8 Documentation


The maven fabric8:push goal pushes the docker image generated via mvn docker:build to either the global docker registry or a local docker registry.

When running kubernetes on a number of machines your docker image needs to be in a docker registry so that it can be downloaded and cached on each host.

To push your image you will need to run:

mvn install docker:build docker:push

If you wish to push docker images to a private or public registry you will need to add a section to your ~/.m2/settings.xml file with a dummy login and password where the server id matches the value of $DOCKER_REGISTRY. For example a local boot2docker based registry would look like this:


For more details see the docker maven plugin docs

Specifying the location of your local docker registry

When creating new docker images for use in Kubernetes you probably want to run a local docker registry if you do not intend to reuse the public docker registry.

Make sure you have added this to your ~/.m2/settings.xml file to define the docker.registry value in a profile you can activate by default...

e.g. add this to the <servers> element:

<?xml version="1.0"?>





See the reference docs for docker:push