Public | Automated Build

Last pushed: 2 years ago
Short Description
Minimal Erlang + Debian Docker image
Full Description

Minimal Erlang Docker Image

This is a minimal Docker image that contains the erlang-base installation
from Erlang Solutions. It clocks in at 145 Mb and contains nothing more
than the Debian base image plus the erlang-base package. It is ideal for
running an Erlang or Elixir release without the need to install any additional

Adding an Erlang or Elixir App

This image can be used to install an Erlang or Elixir release directly. You
don't need to include the Erlang Runtime System (ERTS) into the release since
it is provided by the erlang-base package. For example, using Relx you
can generate the release with the flag --include-erts false or the
relx.config directive {include_erts, false}. You also do not need to
install the elixir package if you have created an Erlang release from your
Elixir project. Your Elixir apps automatically depend on Elixir by default and
will pull in the relevant Elixir components into your release.

All you need to do is to copy over your release into the image and run your
start script. This should automatically find the Erlang VM and start your

A sample Dockerfile for using an Erlang release tar archive generated by Relx:

FROM eproxus/erlang-base
ADD myrelease-0.0.1.tar.gz /opt/myrelease/
CMD ["/opt/myrelease/bin/myrelease", "console"]

Running that image will drop you directly into the console of your Erlang


Most likely your dependencies will be included in your Erlang release archive
already. If you need to install any dependencies as Debian packages, you can
exclude them from your release and install them manually. The following
packages are installed by default:

  • erlang-base - Erlang/OTP virtual machine and base applications
  • erlang-syntax-tools - Erlang/OTP modules for handling abstract Erlang
    syntax trees
  • erlang-crypto - Erlang/OTP cryptographic modules

Since this images only has erlang-base and dependencies installed, you can
add extra Erlang libraries by installing the necessary packages if you need to.
To add additional packages, install them before adding your application to your

RUN apt-get update && \
    apt-get install -y erlang-xmerl=VERSION && \
    rm -rf /var/lib/apt/lists/*
Docker Pull Command
Source Repository

Comments (0)