rebar3_docker - A rebar3 plugin to build docker images from Erlang releases

At Stritzinger we just released a very simple rebar3 plugin to create docker images out of your Erlang releases. It is called rebar3_docker and you can find it:

To try it, just create a simple project:

rebar3 new app
cd mylib
cat >> rebar.config <<EOF
{plugins, [rebar3_docker]}.
{relx, [
{release, {mylib, “0.1.0”}, [mylib]},
{include_src, false},
{include_erts, true}
]}.
EOF
rebar3 docker build
docker run --rm -it local/mylib console

We hope it could be useful for others too, and would be happy to receive any feedback !

22 Likes

This is great. I built an image and deployed it on AWS ECS.

I have this in my rebar3.config

{relx, [
    {release, {myapp, "1.0.0"}, [myapp, sasl]},
    {include_src, false},
    {include_erts, true}

Is it possible to build dev version of release by default and prod version (like ^) only when building docker image?