alpine-erlang
alpine-erlang copied to clipboard
"Unable to load crypto library." on docker run
Hi! Thank you so much for the Dockerfile template!! It was awesome to get my first image build following the hello_phoenix example!
However, when I attempted to do docker run
on the image. I came across this error.
{error_logger,{{2016,2,17},{7,15,51}},"Unable to load crypto library. Failed with error:~n\"~p,
~s\"~nOpenSSL might not be installed on this system.~n",[load_failed,"Failed to load NIF library:
'Error loading shared library /content_ui/lib/crypto-3.6.1/priv/lib/crypto.so: Exec format error'"]}
I can't seem to get pass this error, even with building the image from alpine. If it is not too much hassle, would you mind giving me some directions on how to resolve this issue?
I also get this! Even ensuring that there was a rel/relx.config
file with correct contents.
Just saw the problem. I'll take a look at it today. Thanks for reporting it.
Please try this:
- Make sure you have the
rel/relx.config
file as described in Phoenix + Elixir Release Manager (exrm) - Clean your
rel/<your_project>
folder. This is necessary because in case you have runMIX_ENV=prod mix release
withoutrel/relx.config
, you probably still have files specific to your build architecture. In this case you still have the/content_ui/lib/crypto-3.6.1/priv/lib/crypto.so
file build for your build environment, not for Alpine Linux.
I continued to have issues -- but in the end I just went back to what I had been doing, which was building in Alpine linux with your helpful elixirgcc image, using separate Dockerfile.build/Dockerfile files for building and running.