Skip to content

Instantly share code, notes, and snippets.

@ajm113
Created November 9, 2017 00:25
Show Gist options
  • Save ajm113/d6fe5b4079ef2e34f920110851efaf90 to your computer and use it in GitHub Desktop.
Save ajm113/d6fe5b4079ef2e34f920110851efaf90 to your computer and use it in GitHub Desktop.
Simple Erlang/Rebar3 Dockerfile Container Configuration
############################################################
# Dockerfile BASE for Erlang and Rebar3
############################################################
FROM alpine:3.6
MAINTAINER Andrew McRobb
# Include important deps.
RUN apk update && apk add --no-cache \
git make erlang-asn1 erlang-crypto erlang-dev erlang-dialyzer erlang-eunit erlang-inets \
erlang-public-key erlang-sasl erlang-ssl erlang-syntax-tools erlang-tools && \
rm -rf /var/cache/apk/*
# Download and Install rebar3 for Erlang.
WORKDIR /usr/local/src
RUN git clone https://github.com/erlang/rebar3.git
WORKDIR /usr/local/src/rebar3
RUN ./bootstrap && ./rebar3 local install
# Do a little cleanup to keep our image size down.
WORKDIR /usr/local/src
RUN rm -rf rebar3
# Used to write our app to to avoid long build times.
VOLUME /app/
ENV PATH="/root/.cache/rebar3/bin:$PATH"
# This container won't really do anything except
# act as a wrapper for our enviroment.
ENTRYPOINT "/bin/sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment