dommage
is a shell script that wraps the Mirage CLI to make use of Docker
containers. This has a handful of notable benefits:
- you can cache the OPAM build artefacts in the container image which speeds up local builds;
- by publishing said build container image, you can re-use it in Travis builds, speeding those up considerably; and
- you can now easily test build
-t xen
targets on OSX.
I've tried to minimise interference with the normal operation of Mirage CLI so
simply replacing mirage
with dommage
is supposed to work. To publish the
resulting container image, dommage publish <image>
. See my
website Makefile and .travis.yml for extended
examples.
Issues, comments, suggestions and bug fixes all welcome!
To start, dommage
provides a few management commands to manipulate the build
container:
dommage init BASE-IMAGE
creates a new container, based offBASE-IMAGE
from the Docker Hubdommage publish IMAGE
commits the current container and pushes it to Docker Hub asIMAGE
dommage destroy
stops and removes the current build containerdommage run ...
executes a command inside the current build container
In addition, it wraps the main Mirage CLI commands:
dommage configure ...
runsmirage configure ... && make depends
inside the build contianerdommage build ...
runsmirage build ...
inside the build containerdommage clean ...
runsmirage clean ...
inside the build container