Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. FROM elixir:1.9.1-alpine as build
  2.  
  3. # # install build dependencies
  4. RUN apk add --no-cache \
  5. gcc \
  6. g++ \
  7. git \
  8. make \
  9. musl-dev
  10. RUN mix do local.hex --force, local.rebar --force
  11. WORKDIR /app
  12.  
  13. FROM build as deps
  14.  
  15. COPY mix.exs mix.lock ./
  16.  
  17. ARG MIX_ENV=prod
  18. ENV MIX_ENV=$MIX_ENV
  19. RUN mix do deps.get --only=$MIX_ENV, deps.compile
  20.  
  21. FROM deps as releaser
  22. COPY . .
  23. ENV MIX_ENV=$MIX_ENV
  24. RUN mix release app
  25.  
  26. FROM alpine:3.9
  27. RUN apk add --no-cache bash libstdc++ openssl
  28. WORKDIR /app
  29. COPY --from=releaser /app/_build/prod/rel/app ./
  30.  
  31. EXPOSE 4000
  32.  
  33. ENTRYPOINT ["/app/bin/app"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement