Skip to content

Instantly share code, notes, and snippets.

@tobyhede tobyhede/Dockerfile
Created Nov 20, 2015

Embed
What would you like to do?
Elixir Phoenix Dockerfile
FROM ubuntu:14.04.3
MAINTAINER Toby Hede <>
ENV ELIXIR_VERSION 1.1.1
ENV PORT 80
ENV MIX_ENV prod
# Elixir requires UTF-8
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
EXPOSE 80
# update and install some software requirements
RUN apt-get update && apt-get upgrade -y && apt-get install -y build-essential git wget
# download and install Erlang package
RUN wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
&& apt-get update
# install erlang from package
RUN apt-get install -y erlang erlang-ssl erlang-inets && rm erlang-solutions_1.0_all.deb
# install elixir from source
RUN git clone https://github.com/elixir-lang/elixir.git && cd elixir && git checkout v$ELIXIR_VERSION && make
ENV PATH $PATH:/elixir/bin
# install mix
RUN /elixir/bin/mix local.hex --force && /elixir/bin/mix local.rebar --force && mix hex.info
COPY ./ app
WORKDIR /app
# RUN mix deps.get
RUN mix phoenix.digest && mix release
CMD rel/$APP/bin/$APP foreground
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.