elixir-plug-ecto.dockerfile 643 B

12345678910111213141516171819202122232425262728293031323334353637
  1. FROM elixir:1.9.4 as builder
  2. RUN apt-get update -y && \
  3. apt-get install -y libicu-dev
  4. ENV MIX_ENV=prod \
  5. LANG=C.UTF-8
  6. RUN mkdir /app
  7. WORKDIR /app
  8. COPY config ./config
  9. COPY lib ./lib
  10. COPY mix.exs .
  11. COPY mix.lock .
  12. RUN mix local.hex --force
  13. RUN mix local.rebar --force
  14. RUN mix deps.get
  15. RUN mix deps.compile
  16. RUN mix release
  17. FROM debian:buster-slim AS app
  18. RUN apt-get update -y && \
  19. apt-get install -y openssl libicu-dev
  20. ENV LANG=C.UTF-8
  21. EXPOSE 8080
  22. RUN adduser -h /home/app -D app
  23. WORKDIR /home/app
  24. COPY --from=builder /app/_build .
  25. # Run the Phoenix app
  26. CMD ["./prod/rel/framework_benchmarks/bin/framework_benchmarks", "start"]