Skip to content

Instantly share code, notes, and snippets.

@pmeinhardt
Last active May 22, 2019 08:53
Show Gist options
  • Save pmeinhardt/5f4127a376af01770311575dd1ce672b to your computer and use it in GitHub Desktop.
Save pmeinhardt/5f4127a376af01770311575dd1ce672b to your computer and use it in GitHub Desktop.
Develop Erlang/OTP inside a Docker container

Develop Erlang/OTP inside the official erlang/ubuntu-build Docker image.

It comes with all the correct versions of dependencies pre-installed.

Place the develop script in the scripts directory of your local erlang/otp checkout.

#!/usr/bin/env bash
ROOT=$(realpath "$(dirname "$0")/..")
IMAGE=erlang/ubuntu-build:64bit
WORKDIR=/buildroot/otp
docker pull $IMAGE
exec docker run \
--interactive \
--tty \
--rm \
--workdir $WORKDIR \
--volume $ROOT:$WORKDIR \
--env ERL_TOP=$WORKDIR \
--env MAKEFLAGS=-j4 \
$IMAGE \
bash -c 'export PATH=$ERL_TOP/bin:$PATH && bash'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment