Hi,
I am trying to build a multiple architecture image using Docker build.
> docker build -t chargio/liveview_counter --push --platform linux/arm64 .
I get an error (139) running this
> [+] Building 7.3s (16/28) docker:desktop-linux
> => [internal] load .dockerignore 0.0s
> => => transferring context: 1.35kB 0.0s
> => [internal] load build definition from Dockerfile 0.0s
> => => transferring dockerfile: 2.54kB 0.0s
> => [internal] load metadata for docker.io/library/debian:bookworm-20230612-slim 0.9s
> => [internal] load metadata for docker.io/hexpm/elixir:1.15.3-erlang-26.0.2-debian-bookworm-20230612-slim 1.0s
> => [builder 1/17] FROM docker.io/hexpm/elixir:1.15.3-erlang-26.0.2-debian-bookworm-20230612-slim@sha256:9fdcffc63a03bf77bf437510634ee7ad182135fc246283986c58fd8686c89326 0.0s
> => => resolve docker.io/hexpm/elixir:1.15.3-erlang-26.0.2-debian-bookworm-20230612-slim@sha256:9fdcffc63a03bf77bf437510634ee7ad182135fc246283986c58fd8686c89326 0.0s
> => [internal] load build context 0.1s
> => => transferring context: 73.36kB 0.1s
> => [deploy 1/6] FROM docker.io/library/debian:bookworm-20230612-slim@sha256:d8f9d38c21495b04d1cca99805fbb383856e19794265684019bf193c3b7d67f9 0.0s
> => => resolve docker.io/library/debian:bookworm-20230612-slim@sha256:d8f9d38c21495b04d1cca99805fbb383856e19794265684019bf193c3b7d67f9 0.0s
> => CACHED [deploy 2/6] RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales && apt-get clean && rm -f /var/lib/apt/lists/*_* 0.0s
> => CACHED [deploy 3/6] RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen 0.0s
> => CACHED [deploy 4/6] WORKDIR /app 0.0s
> => CACHED [deploy 5/6] RUN chown nobody /app 0.0s
> => CACHED [builder 2/17] RUN apt-get update -y && apt-get install -y build-essential git && apt-get clean && rm -f /var/lib/apt/lists/*_* 0.0s
> => CACHED [builder 3/17] WORKDIR /app 0.0s
> => CACHED [builder 4/17] RUN mix local.hex --force && mix local.rebar --force 0.0s
> => CACHED [builder 5/17] COPY mix.exs mix.lock ./ 0.0s
> => ERROR [builder 6/17] RUN mix deps.get --only prod 6.1s
> ------
> > [builder 6/17] RUN mix deps.get --only prod:
> 6.023 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> 6.036 Segmentation fault
> ------
> Dockerfile:39
> --------------------
> 37 | # install mix dependencies
> 38 | COPY mix.exs mix.lock ./
> 39 | >>> RUN mix deps.get --only $MIX_ENV
> 40 | RUN mkdir config
> 41 |
> --------------------
> ERROR: failed to solve: process "/bin/sh -c mix deps.get --only $MIX_ENV" did not complete successfully: exit code: 139
Blockquote
The same works great when using amd64.
I am using the Dockerfile generated by mix release --docker
. And I’ve changed the debian version several times to use ‘bullseye’ - the default, ‘buster’, and ‘bookworm’, with the same result.
Do you know if there is some problem with the arm64 version of the image?