我在对我的 rebar3 应用程序进行 dockerizing 时遇到了一些问题。当我尝试运行应用程序(构建后)时,我收到一个错误/prod/bin/prod: line 272: /prod/erts-11.2.2.1/bin/erl: not found
这是我的 rebar.config:
{plugins, [rebar3_hex]}.
{deps, [
{cowboy, "2.6.0"},
{eredis, "1.3.3"},
{hackney, "1.17.4"},
{jiffy, "1.0.8"}
]}.
{shell, [
% {config, "config/sys.config"},
{apps, [gmm]}
]}.
{relx, [
{release, {prod, "0.0.1"}, [
sasl,
gmm
]}
]}.
{profiles, [{prod, [{relx, [
{dev_mode, false},
{include_erts, true},
{include_src, false},
{debug_info, strip}]}]
}]}.
这是我的 Dockerfile
FROM erlang:23
RUN mkdir /buildroot
WORKDIR /buildroot
COPY src src/
COPY include include/
COPY rebar.config .
RUN rebar3 as prod release
FROM alpine
RUN apk add --no-cache openssl && \
apk add --no-cache ncurses-libs
COPY --from=0 /buildroot/_build/prod/rel/prod /prod
EXPOSE 8080
CMD ["/prod/bin/prod", "console"]
你有什么想法可能是问题的根源吗?