Created
November 20, 2015 03:37
-
-
Save tobyhede/d0d87b64bb9b9c65ec00 to your computer and use it in GitHub Desktop.
Elixir Phoenix Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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