Skip to content

Instantly share code, notes, and snippets.

@telnicky
Last active September 10, 2016 20:40
Show Gist options
  • Save telnicky/8fa24465413894b3d1328629fd03cd40 to your computer and use it in GitHub Desktop.
Save telnicky/8fa24465413894b3d1328629fd03cd40 to your computer and use it in GitHub Desktop.
Dockerfile for a Phoenix application
FROM elixir:1.3
RUN apt-get update
RUN apt-get install -y erlang-dev erlang-parsetools
ENV PHOENIX_VERSION 1.2.0
RUN mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phoenix_new-$PHOENIX_VERSION.ez
WORKDIR /code
COPY . .
ENV MIX_ENV prod
RUN mix local.hex --force
RUN mix local.rebar --force
RUN mix deps.get
RUN mix compile
CMD ["mix", "phoenix.server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment