Skip to content

Instantly share code, notes, and snippets.

@capitalist
Created June 8, 2021 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capitalist/6778576e5a21400746529b8656244622 to your computer and use it in GitHub Desktop.
Save capitalist/6778576e5a21400746529b8656244622 to your computer and use it in GitHub Desktop.
Phoenix Docker
FROM elixir:latest
ENV HOME /opt/my_app
RUN mkdir -p $HOME
WORKDIR $HOME
ENV MIX_ENV dev
ENV PORT ${PORT:-4000}
EXPOSE $PORT
RUN mix local.hex --force
RUN mix local.rebar --force
COPY mix.* $HOME
RUN mix deps.get
RUN mix deps.compile
COPY . $HOME
RUN mix compile
CMD mix do ecto.migrate, phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment