Mojolicious, Docker and why I use it that way…

A while ago I started using Docker to run a variety of services on my little dedicated server, mostly because it makes things a bit easier to manage, and the whole idea of resource isolation is also not too bad. Mostly it was about the ease of use.

To make things even easier (well, sort of) and to be able to run certain apps with certain versions of Mojolicious (because hey, legacy code sometimes stays legacy until the spare time has been found to un-legacy it) and Docker seemed to be a great idea for this. Of course, there was no easy Docker container for it, or rather, there were some, but they came with too much cruft.

I set out to make my own container, and the result can be seen on Docker Hub – a very simple container, that just has Mojolicious installed. It does not run apps for you, however, and is better used as a base image to base your own images on.

I’ve created a base image (for my own use, really) that uses a cpanfile to install any last minute dependencies, and comes with a very simple startup script that assumes you’ll mount your entire app under a directory, and runs it from there.

Why do it this way? Maximum flexibility, really. I can run apps under a certain version of Mojolicious, with a relatively clean and slim image, without having it try to do everything (and make coffee).


Ben van Staveren

A somewhat odd traveler, wanderer, wonderer and all-around sarcastic pain in peoples' asses, most of the time. Keeps busy with IT security, random acts of geekery, and other things that have nothing whatsoever to do with IT, computers, or electronics. Can currently be found residing in Jakarta, Indonesia.