msaraiva / alpine-erlang

Minimal Erlang/Elixir docker images with Alpine Linux
205 stars 6 forks source link

Error running app: {"init terminating in do_boot",{'cannot load',asn1rt_nif,get_files}} #15

Open chris opened 8 years ago

chris commented 8 years ago

I've built a Phoenix app following the directions, with some minor tweaks. Specifically, since I'm using Erlang 18.3, I'm using the "alpine:3.4" Docker image, and then updating Erlang (which shows it gets 18.3). But, when I run I see:

# docker run --rm -p 4000:4000 lana
created directory: '/lana/running-config'
Exec: /usr/lib/erlang/erts-7.3.1/bin/erlexec -noshell -noinput +Bd -boot /lana/releases/0.0.1/lana -mode embedded -config /lana/running-config/sys.config.2.config -boot_var ERTS_LIB_DIR /usr/lib/erlang/erts-7.3.1/../lib -env ERL_LIBS /lana/lib -pa /lana/lib/lana-0.0.1/consolidated -args_file /lana/running-config/vm.args.2.config -- foreground
Root: /lana
{"init terminating in do_boot",{'cannot load',asn1rt_nif,get_files}}

My Dockerfile is the same as the example, except for the first two lines which I've changed to:

FROM alpine:3.4

RUN apk --update add erlang erlang-crypto erlang-sasl erlang-syntax-tools && rm -rf /var/cache/apk/*

From some Googling, it seems the "asn1rt_nif" has something to do with crypto stuff maybe? But it seems I need the erlang-crypto, etc. Anyone have ideas on what I might be doing wrong, or have mismatched, or what to investigate?

msaraiva commented 8 years ago

Assuming erlang-asn1 was successfully installed, the only reason I can see is that exrm has pulled the Erlang runtime system from your build environment. Have you tried to setup the rel/relx.config file as described here?

gottfrois commented 7 years ago

I have the same exact issue, host is Mac OSX but i've added the following in rel/relx.config and it still does not work.

{include_erts, false}. Any idea?