Cover image for So I created a Docker image for Elm Test and here's why

So I created a Docker image for Elm Test and here's why

aminnairi profile image Amin ・2 min read

I like Docker. It's really cool having one way of running apps in multiple platforms without the headache of the whole installation process specific to each platforms (Windows, UNIX, GNU/Linux).

But I also like Elm. It is a JavaScript framework for building Web apps in a functional way.

And I love proposing solutions to the Dev Challenges here using Elm. This also means that my code has to be 100% working. For me, this means working my way using test driven development (TDD).

TDD allows you to write tests ahead of development, defining your specs before you even write a single line of code so that the next time your start writing and testing your application, you know that you already have tests to pass before shipping your application.

Elm Test is the perfect package for this task when it comes to write Elm modules. It has almost the same API as Mocha and Chai, two JavaScript frameworks for unit tests that I already use when doing TDD.

So, for me, I needed a way to be able to run tests in a portable way. Be able to fire up a Docker container running the Elm Test binary and fly away like a falcon.

Elm Test Docker

At first, I searched the Docker Hub for any existing package that was doing a similar job.

But they were either too heavy (500+ Mb for some), undocumented (or poorly), or just some drafts leftover in the abyss of the Hub.

But either way, I wasn't going to use some other people's package when I could take an opportunity to do it myself as a learning process.

So I created a Docker image for Elm Test.


Editor guide