Quelle dommage
Richard Mortier · November 05, 2017 · #tech #linux #old #docker #mirage #unikernelsEd: this tool is perhaps less relevant now that both Mirage and OPAM have moved on. But perhaps it’ll be resurrected one day so here it is.
Largely because I wanted to make a feeble attempt at a French pun, dommage
is a tool for Docker containerising Mirage unikernels. From the README:
Dommage, Dockerised Mirage
dommage
is a shell script that wraps the Mirage CLI to make use of Docker containers meaning that:
- you can cache the OPAM build artefacts in the container image, speeding up local builds;
- you can re-use the build container image in Travis builds by publishing it, speeding those up considerably; and
- you can 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>
.
Issues, comments, suggestions and bug fixes all welcome!
Operation
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