Created
April 3, 2020 00:07
-
-
Save shmink/57e5f23b4016de85ba76e8c3e1cd4da4 to your computer and use it in GitHub Desktop.
Elixir releases Dockerfile
This file contains 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
# ---- Build Stage ---- | |
FROM elixir:1.10-alpine as builder | |
ENV MIX_ENV=prod | |
COPY lib ./lib | |
COPY mix.exs . | |
COPY mix.lock . | |
RUN mix local.rebar --force \ | |
&& mix local.hex --force \ | |
&& mix deps.get \ | |
&& mix release | |
# ---- Application Stage ---- | |
FROM alpine:3 | |
RUN apk add --no-cache --update bash openssl | |
WORKDIR /app | |
COPY --from=builder _build/prod/rel/my-app/ . | |
CMD ["/app/bin/my-app", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment