Sounds a bit like Docker is at a loss. Caught between a closed source OS (rock) and an architecture change (hard place). Ideally, they could leverage Rosetta2 to run x64 containers under macOS on Apple Silicon ... but I guess Apple isn't playing ball (because otherwise they would have probably announced it at WWDC). At this point I see an Apple Silicon based Mac is just a consumer device, I don't think I'm going to b…
Apple Silicon M1 Chips and Docker
21–30 of 129 posts
Re: Apple Silicon M1 Chips and Docker
#22This doesn't really clear up any of the questions I have. Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?
Through QEMU
There are already attempts in progress: https://news.ycombinator.com/item?id=25064593
Re: Apple Silicon M1 Chips and Docker
#23This doesn't really clear up any of the questions I have. Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?
The question is: why even care? Use an Arm image. For docker, it makes little to no difference
Re: Apple Silicon M1 Chips and Docker
#24This doesn't really clear up any of the questions I have. Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?
Re: Apple Silicon M1 Chips and Docker
#25Sounds a bit like Docker is at a loss. Caught between a closed source OS (rock) and an architecture change (hard place). Ideally, they could leverage Rosetta2 to run x64 containers under macOS on Apple Silicon ... but I guess Apple isn't playing ball (because otherwise they would have probably announced it at WWDC). At this point I see an Apple Silicon based Mac is just a consumer device, I don't think I'm going to b…
Re: Apple Silicon M1 Chips and Docker
#26Earlier quoted context omitted.
Answer your own question: Can Docker on ARM run x86? Can Docker on x86 run ARM? If not, then why expect Apple ARM to run x86?
Apple ARM can run x86 under Rosetta 2. The question is whether that can happen under Docker.
Re: Apple Silicon M1 Chips and Docker
#27This doesn't really clear up any of the questions I have. Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?
They mention using Apple's Hypervisor Framework. On Apple Silicon, this runs ARM64 programs only (Rosetta 2 is unavailable to programs running inside Apple's Hypervisor Framework). https://developer.apple.com/documentation/apple_silicon/abou... Unless they plan to run an emulator inside the Hypervisor Framework (a seemingly unnecessary effort since you could run the emulator without Hypervisor) this implies x86 conta…
And if you're on x86, you can run ARM containers with QEMU userspace emulation seamlessly after running
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
The inverse would be extremely easy as well.Re: Apple Silicon M1 Chips and Docker
#28This doesn't really clear up any of the questions I have. Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?
The question is: why even care? Use an Arm image. For docker, it makes little to no difference
Re: Apple Silicon M1 Chips and Docker
#29Earlier quoted context omitted.
The question is: why even care? Use an Arm image. For docker, it makes little to no difference
That requires that ARM images are available, which will take time and always have a disconnect. It also violates the idea of being able to run the exact same image on your laptop (ARM Mac) and in prod (x86 server).
Realistically, ARM is probably the future, and just needs something to push society in the direction of the future. A lot of people use Macs, so this forces people to become interested in switching, which has some value. Remember when the original iMac had USB instead of ADB ports? Everyone was mad about it. But USB was the future -- you can plug that iMac's mouse into pretty much any computer you have and it still works.
(I've been wanting an ARM desktop for a while, but it seems there is trouble standardizing something like BIOS/UEFI, and the CPUs you can buy are more expensive and slower than x86 alternatives. I'm also not sure if anyone ever decided what the standard "ARM" configuration looks like... binary calling conventions, endianness, supported instructions? But, if Apple can make a competitive ARM chip, so can others, and the standards will follow. We'll see!)
Re: Apple Silicon M1 Chips and Docker
#30Earlier quoted context omitted.
They mention using Apple's Hypervisor Framework. On Apple Silicon, this runs ARM64 programs only (Rosetta 2 is unavailable to programs running inside Apple's Hypervisor Framework). https://developer.apple.com/documentation/apple_silicon/abou... Unless they plan to run an emulator inside the Hypervisor Framework (a seemingly unnecessary effort since you could run the emulator without Hypervisor) this implies x86 conta…
Docker for Mac already can build and run cross-arch containers: https://docs.docker.com/docker-for-mac/multi-arch/ And if you're on x86, you can run ARM containers with QEMU userspace emulation seamlessly after running docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 The inverse would be extremely easy as well.