erlang / docker-erlang-otp

the Official Erlang OTP image on Docker Hub

Home Page:https://hub.docker.com/_/erlang/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alpine image Could not locate code path for crypto-4.4.2!

Sebisnow opened this issue · comments

We can not run our Elixir apps deployed with distillery in this base Erlang alpine docker image any more.
On application start we keep getting the error:

Could not locate code path for crypto-4.4.2!

Our automated build process always takes the latest version of the erlang:alpine docker image and up until now (with only one exception last year) everything worked fine.

all we do is:

FROM erlang:alpine
MAINTAINER sebisnow
# Default to UTF-8 file.encoding
ENV LANG=C.UTF-8

RUN set -x; \
    apk update && \
    apk upgrade && \
    apk --update add bash && \
    rm -rf /var/cache/apk/*

ENV app=<the_app_to_deploy>
COPY --from=builder /app/_build/prod/ /app

EXPOSE 8080
WORKDIR /app

CMD trap exit TERM; /app/rel/${app}/bin/${app} foreground & wait

How to fix this issue? Or should we just wait for a fix you are working on already?

I found the problem. It was my own fault, as we use the elixir:alpine docker image for building the deployment with distillery and elixir:alpine still has Erlang OTP 21 installed. Thus I built my application with an older version of erlang and therefore some libs like crypto or stdlib cannot be found.