Live data from Hacker News

Apple Silicon M1 Chips and Docker

docker.com

21–30 of 129 posts

Re: Apple Silicon M1 Chips and Docker

#21
post #17

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…

There's an ironic parallel in Docker referring to software as "content".

Re: Apple Silicon M1 Chips and Docker

#22
post #5
post #2

This 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

I wonder how long it will be until the Hackintosh community manages to boot macOS on a fully emulated ARM hardware.

There are already attempts in progress: https://news.ycombinator.com/item?id=25064593

Re: Apple Silicon M1 Chips and Docker

#23
post #2

This 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

What are you going to deploy that ARM image to?

Re: Apple Silicon M1 Chips and Docker

#24
post #2

This 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?

No. That's what they said: you will build for your deployment architecture, just as you would today with the arm aws systems. The virtualization is that: virtualization. It isn't emulation for that you need Qemu or similar.

Re: Apple Silicon M1 Chips and Docker

#25
post #17

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…

I think Apple didn’t want to support x86 emulation at all, and made Rosetta 2 purely AOT compilation (which you can’t really do with virtual machines). It makes it so they don’t have to deal with having x86 VMs available but super slow making people think that Apple Silicon is slow (even if that’s untrue), and that’s kind of the growing pain that Microsoft is going through at the moment with Windows on ARM.

Re: Apple Silicon M1 Chips and Docker

#26

Earlier 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.

It runs user space x86 under arm, and those are all well formed programs that the os understands. Rosetta is a translator - to run a vm in a different architecture requires an emulator.

Re: Apple Silicon M1 Chips and Docker

#27
post #2

This 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…

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.

Re: Apple Silicon M1 Chips and Docker

#28
post #2

This 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

[deleted]

Re: Apple Silicon M1 Chips and Docker

#29

Earlier 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).

You can run on ARM servers in production. They're even cheaper than x86 servers. (Though also slower, at least AWS's version.)

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

#30

Earlier 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.

Hmm. I would guess then that Docker would be aiming for both emulation and hypervisor. Seems reasonable.
Post reply on HN