Created
July 22, 2017 19:40
-
-
Save KamilLelonek/1c87016799752f44ff51a3145bf35afc to your computer and use it in GitHub Desktop.
Elixir Dockerfile
This file contains hidden or 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
# Latest version of Erlang-based Elixir installation: https://hub.docker.com/_/elixir/ | |
FROM elixir:latest | |
# Create and set home directory | |
WORKDIR /opt/your_application_name | |
# Configure required environment | |
ENV MIX_ENV prod | |
# Install hex (Elixir package manager) | |
RUN mix local.hex --force | |
# Install rebar (Erlang build tool) | |
RUN mix local.rebar --force | |
# Copy all dependencies files | |
COPY mix.* ./ | |
# Install all production dependencies | |
RUN mix deps.get --only prod | |
# Compile all dependencies | |
RUN mix deps.compile | |
# Copy all application files | |
COPY . . | |
# Compile the entire project | |
RUN mix compile | |
# Run the application itself | |
CMD ./scripts/docker.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment