Skip to content

Instantly share code, notes, and snippets.

@sntran
Last active December 17, 2015 23:09
Show Gist options
  • Save sntran/5686959 to your computer and use it in GitHub Desktop.
Save sntran/5686959 to your computer and use it in GitHub Desktop.
Dockerfile for Erlang container for Docker.IORename each of these to `Dockerfile` to build the imagedocker build -t="{imagename}" .docker run -i -t {imagename} /bin/bash
# Elixir on Erlang
#
# VERSION 0.13.2
FROM sntran/kerl
MAINTAINER Son Tran-Nguyen "me@sntran.com"
RUN apt-get install -y unzip
RUN mkdir -p /opt/erlang/elixir
RUN cd /opt/erlang/elixir && curl -L -O https://github.com/elixir-lang/elixir/releases/download/v0.13.2/Precompiled.zip && unzip Precompiled.zip
RUN rm /opt/erlang/elixir/Precompiled.zip
RUN ln -s /opt/erlang/elixir/bin/elixir /usr/local/bin/elixir
RUN ln -s /opt/erlang/elixir/bin/iex /usr/local/bin/iex
RUN ln -s /opt/erlang/elixir/bin/mix /usr/local/bin/mix
# Erlang HiPE with Rebar
#
# VERSION 17.0
FROM base
MAINTAINER Son Tran-Nguyen "hello@sntran.com"
RUN apt-get update
RUN apt-get install -y git build-essential libncurses5-dev openssl libssl-dev curl
# For HiPE, requires M4
RUN apt-get install -y m4
RUN mkdir -p /opt/erlang/
RUN curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl && chmod a+x kerl
RUN mv kerl /opt/erlang/
RUN ln -s /opt/erlang/kerl /usr/local/bin/kerl
RUN kerl update releases
RUN KERL_CONFIGURE_OPTIONS=--enable-hipe kerl build 17.0 17.0
RUN kerl install 17.0 /opt/erlang/17.0
RUN ln -s /opt/erlang/17.0 /opt/erlang/current
RUN cd /usr/local/bin && find /opt/erlang/current/bin -exec ln -s '{}' \;
## Install Rebar
RUN cd /opt/erlang && git clone git://github.com/rebar/rebar.git
RUN cd /opt/erlang/rebar && ./bootstrap
RUN ln -s /opt/erlang/rebar/rebar /usr/local/bin/rebar
## Install relx
RUN cd /opt/erlang && git clone git://github.com/erlware/relx.git
RUN cd /opt/erlang/relx && ./make
RUN ln -s /opt/erlang/relx/relx /usr/local/bin/relx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment