# \[ANN\] dommage, Dockerising the Mirage CLI

**URL:** <https://discuss.ocaml.org/t/ann-dommage-dockerising-the-mirage-cli/470>\
**Category:** Community\
**Tags:** docker, mirageos\
**Created:** [June 26, 2017, 2:33pm UTC](https://discuss.ocaml.org/t/ann-dommage-dockerising-the-mirage-cli/470 "2017-06-26T14:33:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mort](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mort](https://discuss.ocaml.org/u/mort)\
**Post date:** [June 26, 2017, 2:33pm UTC](https://discuss.ocaml.org/t/ann-dommage-dockerising-the-mirage-cli/470/1 "2017-06-26T14:33:34Z")

</div>

All;

I’ve just pushed a first cut at a tool, [`dommage`](https://github.com/mor1/dommage)(\*), that wraps the [Mirage](https://mirage.io) command line tool so that it operates within a container. This should mean that:

- 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.

Likely gotchas include how I handle UID/GID mappings between the host, the OPAM CI build container `dommage` derives containers from, and those derived containers; and the inability to set the compiler version (pegged at 4.04.2 once the current container build completes).

I would welcome feedback, positive or negative!

(\*) Yes, the name is a deliberate attempt at a French pun by a non-French speaker. So please tell me if it’s inappropriate, misspelt, or otherwise makes no sense! 🙂

---

<div class="post-metadata">

**Author:** ![yomimono](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/yomimono/32/192_2.png) [@yomimono](https://discuss.ocaml.org/u/yomimono)\
**Post date:** [June 26, 2017, 3:07pm UTC](https://discuss.ocaml.org/t/ann-dommage-dockerising-the-mirage-cli/470/2 "2017-06-26T15:07:32Z")

</div>

This is cool! I haven’t looked at it in detail, but I was wondering from the README: Is there a reason why there are `dommage build`, `dommage configure`, etc commands, rather than `dommage whatever` = `do whatever with miragein the mirage container`, for an arbitrary set of arguments?

---

<div class="post-metadata">

**Author:** ![mort](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mort](https://discuss.ocaml.org/u/mort)\
**Post date:** [June 26, 2017, 3:27pm UTC](https://discuss.ocaml.org/t/ann-dommage-dockerising-the-mirage-cli/470/3 "2017-06-26T15:27:37Z")

</div>

Only that there are `dommage whatever` commands where `mirage whatever`  
doesn’t work (`init`, `destroy`, `publish`, `run`), and I also chose to  
make the `dommage configure` command also run `make depend` after `mirage configure`.

But I guess I could probably make that logic a bit neater so that the  
non-overridden cases just pass through…  
(Are there any `mirage` commands missing particularly?)
