abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
18.62k stars 380 forks source link

CPU op-code 32 bit with Rosetta2 emulation under vz #1119

Open diehard2 opened 3 weeks ago

diehard2 commented 3 weeks ago

Description

starting colima with

colima start --arch aarch64 --vm-type=vz --vz-rosetta

my docker-compose file is

version: "3.9"
services:
  dds:
    build:
      context: .
      dockerfile: env.Dockerfile
      ssh:
        - default
    platform: linux/amd64
    environment:
etc etc

If I spin everything up this way I get

Architecture: x86_64 CPU op-mode(s): 32-bit

If I do --arch X86_64 I get the expected

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

My understanding is that the way I'm doing it with aarch64 is the correct method for running an X86_64 image emulated on Apple Silicon. I would go with the second approach, but working on it is so slow as to be infeasible. Being only 32 bit but having a 64 bit OS/development environment will be problematic

Version

colima version 0.7.3 git commit: a66b375e8df84ff2860797efc683e66632bcbce3

runtime: docker arch: x86_64 client: v27.1.2 server: v27.1.1 limactl version 0.23.1 qemu-img version 9.0.2 Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

Output of colima status

INFO[0000] colima is running using macOS Virtualization.Framework INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/myname/.colima/default/docker.sock

Reproduction Steps

  1. colima start --arch aarch64 --vm-type=vz --vz-rosetta
  2. docker run -it ubuntu:latest
  3. lscpu

Expected behaviour

lscpu gives

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit

Additional context

No response

diehard2 commented 2 weeks ago

It looks like docker desktop people have some of the same issues under Rosetta

https://github.com/docker/roadmap/issues/384#issuecomment-1901088693