diff --git a/Dockerfile b/Dockerfile index e63181b0..ccbacf2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,10 @@ ARG BUILDER_IMAGE="docker.io/hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION ARG RUNNER_IMAGE="docker.io/debian:${DEBIAN_VERSION}" FROM ${BUILDER_IMAGE} AS builder -ENV MIX_OS_DEPS_COMPILE_PARTITION_COUNT=6 +ENV MIX_OS_DEPS_COMPILE_PARTITION_COUNT=3 +# Enable parallel compilation with 3 cores +ENV ELIXIR_ERL_OPTIONS="+JPperf true" +ENV ERL_AFLAGS="-kernel shell_history enabled" # Disable TTY for cross-architecture builds ENV TERM=dumb @@ -46,8 +49,6 @@ COPY mix.exs mix.lock ./ COPY vendor vendor RUN --mount=type=cache,target=/root/.hex \ --mount=type=cache,target=/root/.mix \ - mix local.hex --force && \ - mix local.rebar --force && \ mix deps.get --only $MIX_ENV RUN mkdir config @@ -57,8 +58,6 @@ RUN mkdir config COPY config/config.exs config/${MIX_ENV}.exs config/ RUN --mount=type=cache,target=/root/.hex \ --mount=type=cache,target=/root/.mix \ - mix local.hex --force && \ - mix local.rebar --force && \ mix deps.compile RUN --mount=type=cache,target=/root/.mix \