elm alias (you probably want to add this to your
.bashrc or similar):
alias elm='docker run -it --rm -v "$(pwd):/code" -w "/code" -e "HOME=/tmp" -u $UID:$GID -p 8000:8000 codesimple/elm:0.17'
Then use the alias to run the elm tools (version 0.17) from the container as you would normally:
elm make elm package elm reactor elm repl
The elm tools in the image are built from source following the instructions at
The current directory is mounted into the container so that the elm tools can locate your project files
and write out
elm.js and the
Port 8000 is published to the host to allow this to be used when running
-p setting if you want to map this to a different port or disable it.
HOME is set to
/tmp in the container so that the
.elm directory generated by the elm tools is placed there
and discarded. If you want to share
.elm between runs you could set it to a directory that you have
mounted a volume or host directory at.
If you run
elm reactor on an uncompiled project, you may get errors along the lines of:
elm-make: elm-stuff/packages/evancz/virtual-dom/2.1.0/src/VirtualDom.elm: hGetContents: invalid argument (invalid byte sequence) elm-make: thread blocked indefinitely in an MVar operation
This can generally be avoided by running
elm make on the project before you run
elm reactor (or after to fix it).
To use a different version of the Elm tools just change the version number in the command above (after
The following versions are currently supported:
elm replfor Elm 0.17 seems to be missing the coloured output that was present in Elm 0.16 (although error messages from
elm makedo appear in colour). I'm not sure if this is an issue with the build or with the Elm source.
This fork basically just replaces the
CMD in order to use the image in a CI environment.