Jul 21, 2017 · 1 min read
Thanks for sharing your test app. I was able to reproduce the error and weirdly enough when I connected to bash on the Docker build image and ran erl, it printed out version 19. So I suspect what’s happening is that the image somehow ends up with both v19 and v20 of erlang which is what causes the problem. This might be due to the elixir edge package being pulled down (maybe that has a dep on erlang 19 instead of 20 since it works with both?). Unfortunately I’m not familiar enough with alpine to debug this, but I tested this Dockerfile and it seemed to work:
FROM elixir:1.4.5
ENV DEBIAN_FRONTEND=noninteractiveENV HOME=/opt/app/ TERM=xterm# Install Hex+Rebar
RUN mix local.hex --force && \
mix local.rebar --forceWORKDIR /opt/app
ENV MIX_ENV=prod REPLACE_OS_VARS=true# Cache elixir deps
COPY mix.exs mix.lock ./
RUN mix deps.get
COPY config ./config
RUN mix deps.compileCOPY . .
RUN mix release --env=prod
