137 exit status on Cabal package installations with DOCKER_DEFAULT_PLATFORM=linux/amd64 on an M1 Mac
jonkri opened this issue · 3 comments
Hello!
My goal is to prepare a linux/amd64 Docker image using DOCKER_DEFAULT_PLATFORM
on an M1 Mac, but cabal
seems to fail to install any package.
For example, running DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm haskell:9-slim bash -c "cabal update && cabal install array"; echo $?
prints 137
indicating an out-of-memory error (even though I have made 12 GB of memory available to Docker). (I arbitrarily picked the array
package since it has no dependencies (except for base
), but any package that I've tried has failed.)
The cabal-install version is 3.6.2.0.
I'm using a fully updated M1 MacBook Pro (14-inch, 2021) with an Apple M1 Pro chip, 16 GB of RAM and macOS Monterey.
I have the latest version of Docker Desktop (4.9.1). The Docker version is 20.10.16 (build aa7e414).
I have tried both version 8 and version 9 of the images (with and without “-slim”).
Thanks!
I noticed that this 137 exit status can occur with apt
(with DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm debian bash -c "apt update && apt-get install -y cabal-install"; echo $?
) and on Arch Linux (with DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm archlinux bash -c "pacman --noconfirm -Suy cabal-install && cabal update && cabal install array"; echo $?
) as well, so it's not specific to this repository. Closing.
Hi @jonkri, did you manage to find a workaround for this?
Hi, @DaQuirm! I guess it depends on the definition of workaround...