Quelle dommage
· 2 min read · 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 xentargets 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-IMAGEcreates a new container, based off- BASE-IMAGEfrom the Docker Hub
- dommage publish IMAGEcommits the current container and pushes it to Docker Hub as- IMAGE
- dommage destroystops and removes the current build container
- dommage run ...executes a command inside the current build container
In addition, it wraps the main Mirage CLI commands:
- dommage configure ...runs- mirage configure ... && make dependsinside the build contianer
- dommage build ...runs- mirage build ...inside the build container
- dommage clean ...runs- mirage clean ...inside the build container