Closed SuddenGunter closed 2 months ago
Arm builds inside docker fail with
8.349 Error while loading project :mime at /app/deps/mime 8.981 Segmentation fault (core dumped) ------ Dockerfile:46 -------------------- 44 | # to be re-compiled. 45 | COPY config/config.exs config/${MIX_ENV}.exs config/ 46 | >>> RUN mix deps.compile 47 | 48 | COPY priv priv -------------------- ERROR: failed to solve: process "/bin/sh -c mix deps.compile" did not complete successfully: exit code: 139
Steps to reproduce:
mix phx.new multiplatform
mix phx.gen.release --docker
I've a sample repo that implements all 3 steps:
linux/amd64 image is being build fine, issue only affects arm64
both amd64 and arm64 images are built correctly
UPD: It turns out to be an old known issue when running Erlang VM under QEMU.
fixed using ENV ERL_FLAGS="+JMsingle true" in my dokerfile after FROM ${BUILDER_IMAGE} as builder line
ENV ERL_FLAGS="+JMsingle true"
FROM ${BUILDER_IMAGE} as builder
Environment
Actual behavior
Arm builds inside docker fail with
Steps to reproduce:
mix phx.new multiplatform
mix phx.gen.release --docker
I've a sample repo that implements all 3 steps:
linux/amd64 image is being build fine, issue only affects arm64
Expected behavior
both amd64 and arm64 images are built correctly