commercialhaskell / commercialhaskell/stack
Stack fails to run in AMD64 docker container on M1 Mac
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
Hey everyone! Thanks for taking the time 👋🏼
### General summary/comments
I need to build some x86 debian-compatible haskell executables, so my hope was to run stack inside a docker container to build them.
I'm aware that stack doesn't run on ARM64 yet, so I'm running my docker containers with the `--platform=linux/amd64` flag to force docker to run things in x86 via Rosetta.
When I try to do _anything_ with *stack*, it exits after a half-second pause, the only output is `Killed`.
### Steps to reproduce
Run the following on an M1 mac with docker and Rosetta installed:
```
$ docker run --platform=linux/amd64 -it --rm --entrypoint bash haskell
# Then, inside the container:
$ stack --help
```
### Expected
I expect `stack` to output its help message.
### Actual
Stack just exits and I see "Killed"
```bash
$ docker run --platform=linux/amd64 -it --rm --entrypoint bash haskell
root@9150ee3e5e45:/# stack
Killed
```
Other commands run just fine, it seems to be an issue with stack.
### Stack version
It'll be whichever stack is installed in the `haskell:latest` docker image, but obviously since I can't run stack I can't check 🙃
Anyone have thoughts on how to debug this or on how to get stack running in docker on an M1 mac?
Contributor guide
Assessment
This issue has not been assessed yet.