I have the following dockerfile for an elixir app.
FROM elixir:1.8.1-alpine as builder
RUN apk update && \
apk add git make alpine-sdk
COPY . .
RUN mix local.hex --force && \
mix local.rebar --force
ENV MIX_ENV=prod
RUN mix deps.get && \
mix compile
RUN mix release
FROM alpine:latest
ENV REPLACE_OS_VARS=true
RUN apk --no-cache add ca-certificates bash openssl
COPY --from=builder _build/prod/rel/app/releases/0.0.1/app.tar.gz .
RUN tar xzvf app.tar.gz && rm -rf app.tar.gz
CMD ["bin/app", "console" ]
Docker build is working fine however when I try to run the image I get the following error
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,'Elixir.Bcrypt.Base'}}},{kernel,start,[normal,[]]}}}"}
Thanks