Can't use rosetta for x86_64?
- Lingua principale
- Go
- Stelle
- 30.8k
- Fork
- 613
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Description
Not sure if this is actually a bug, but I wasn't sure of a more appropriate place to put it.
For background, I'm experiencing problems using Puppeteer in a Docker container. I use Colima and don't have any alternatives installed. My container platform is `linux/amd64` to match the production environment for this app, but my personal host device for developing it is a M1 mac running Ventura 13.5.2.
In a minimal container, puppeteer processes fail with a `ProtocolError: Protocol error (Target.createTarget): Target closed.` error. I've been trying to solve this issue for about three weeks now, and I think that it might be related to my host system architecture being incompatible with the docker container's Chrome binary, and me having messed up some configuration somewhere to make that matter.
According to [the issue I opened in the Puppeteer repo](https://github.com/puppeteer/puppeteer/issues/10855), the library should be working fine with my OS and chosen container platform. I was suggested to use Rosetta in Docker Desktop, but I use Colima and not Docker Desktop.
The command I'm using to start colima is is:
```sh
colima start --cpu 4 --memory 8 --disk 100 --arch x86_64 --vm-type=vz --vz-rosetta --mount-type virtiofs
```
When this starts running, I see the following:
```
`mountType: 9p` is experimental
> "Attempting to download the image" arch=x86_64 digest="sha512:f761b807fe9ba345968df72c07f8c5abcae0c4a44976fe5595c0ff748ef693841221a70e663986c700b027cea32b7cac24d5490d4c721593c39f2b8840c362a2" location="https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.5.5/alpine-lima-clm-3.18.0-x86_64.iso"
> Using cache "/Users/myname/Library/Caches/lima/download/by-url-sha256/blahblahblah/data"
> [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/myname/.lima/colima/serial*.log")
> SSH Local Port: 50777
> [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
...
```
Where I'm concerned about here is that I've specified `vz`, but it's telling me that `QEMU` is running instead. This is not the case if I use `--arch aarch64` instead of `--arch x86_64` (in that case it says it's starting VZ), but that doesn't solve my problem, since the container platform absolutely needs to be amd/linux64 and not ARM.
This is also right after running `colima delete`.
Is this a known issue, or something that's not possible, or am I just doing something wrong?
### Version
Colima Version: 0.5.5
Lima Version: 0.17.2
Qemu Version: 8.1.0
### Operating System
- [ ] macOS Intel <= 12 (Monterrey)
- [ ] macOS Intel >= 13 (Ventura)
- [ ] macOS M1 <= 12 (Monterrey)
- [X] macOS M1 >= 13 (Ventura)
- [ ] Linux
### Output of `colima status`
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/myname/.colima/default/docker.sock
### Reproduction Steps
1. Start colima: `colima start --cpu 4 --memory 8 --disk 100 --arch x86_64 --vm-type=vz --vz-rosetta --mount-type virtiofs`
2. Check out this repo: https://github.com/juananpe/puppeteer-in-docker-in-m1
3. Run `docker build . --platform=linux/amd64 -t puppeteerm1 -f Dockerfile`
4. Run `docker run -it --init puppeteerm1 /bin/bash`
5. Run `node test.js`
### Expected behaviour
Expect the provided repo code to output an image file to the working directory of the docker container.
### Additional context
_No response_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.