Skip to content

Instantly share code, notes, and snippets.

@Ironjanowar
Created September 7, 2019 14:16
Show Gist options
  • Save Ironjanowar/c1bc9f48513104161676803752d5aef4 to your computer and use it in GitHub Desktop.
Save Ironjanowar/c1bc9f48513104161676803752d5aef4 to your computer and use it in GitHub Desktop.
# Use an official Elixir runtime as a parent image
FROM elixir:latest
RUN apt-get update && \
apt-get install -y postgresql-client && \
apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
# Create app directory and copy the Elixir projects into it
RUN mkdir /app
COPY . /app
WORKDIR /app
# Node
RUN cd assets && npm install
WORKDIR /app
# Install hex package manager
RUN mix local.hex --force
RUN mix local.rebar --force
# Get dependencies
RUN mix deps.get
# Compile the project
RUN mix do compile
CMD ["/app/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment