Skip to content

Instantly share code, notes, and snippets.

@benyblack
Created November 1, 2019 09:50
Show Gist options
  • Save benyblack/41f05c2d1d128483528ce91573253de4 to your computer and use it in GitHub Desktop.
Save benyblack/41f05c2d1d128483528ce91573253de4 to your computer and use it in GitHub Desktop.
FROM elixir:1.9.2 as mixer
ENV MIX_ENV=test
ENV PORT=4000
# COPY . /app
RUN mkdir /app
WORKDIR /app
RUN mix local.hex --force
RUN mix local.rebar --force
# install dependencies
COPY mix.exs mix.lock ./
RUN mix deps.get
# compile dependencies
COPY config ./config/
# copy only elixir files to keep the cache
COPY lib ./lib/
COPY priv ./priv/
EXPOSE ${PORT}
ENTRYPOINT ["mix", "test"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment