Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Docker Automatic Build Tool


This tool requires the docker binary be in the running user's path.


The docker automatic build tool is designed to improve re-use and reduce duplication when creating docker images.

Images can be either base images - images that are used for infrastructure or to host code - or deployments - images that are packaged with a versioned, ready-to-run application.

The tool can be run either via command line or with web endpoints (using the serve command).

Quick Start

To get started, get and install the build tool.

go get
go install

The tool can then be launched using container-factory

To see the underlying commands being run, commands can be run with verbosity level 3 -vvv.

Build Commands

A few examples are provided under the /.examples/ directory.

To view the images that will be built during the automatic build process and their inheritance:

docker-automatic-build list-base-images -d $GOPATH/src/

A 0 exit code indicates no issues building the hierarchy.

To build the base images:

docker-automatic-build build-base-images -d $GOPATH/src/ -p docker-registry.localhost --local-only

Note: Base images cannot be built individually. If no changes were made to the underlying docker files, the docker agent will perform a no-op. To force a rebuild, use the --force-rebuild option.

To see available deployments:

docker-automatic-build list-deployments -d $GOPATH/src/

To build a deployment:

docker-automatic-build build-deployment -d $GOPATH/src/ -p docker-registry.localhost example --local-only

Deployments will always be prefixed with /deployments/ in the tag. The above image can be run as a container:

docker run --rm -ti docker-registry.localhost/deployments/example:<username> sh

See the output of container-factory <subcommand> --help for more details.

To push to a remote registry, remove --local-only from the above commands.

Organizing Dockerfiles / Deployments

Dockerfiles and deployments will be tagged based on the folder structure in their respective directories. If your registry supports it, you can nest images as deep as you'd like.


Tool to build container images with dynamic inheritance




No releases published


No packages published


You can’t perform that action at this time.