Rohan Relan
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=noninteractive
ENV HOME=/opt/app/ TERM=xterm# Install Hex+Rebar
RUN mix local.hex --force && \
mix local.rebar --force
WORKDIR /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.compile
COPY . .
RUN mix release --env=prod

)

    Rohan Relan

    Written by

    Looking for some help bringing up ML or other new technologies within your organization? Shoot me a note at rohan@rohanrelan.com

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade