Live data from Hacker News

Tech Preview of Docker Desktop for M1

docker.com

131–140 of 231 posts

Re: Tech Preview of Docker Desktop for M1

#131
After reading the article, I still don't quite understand how this works. I've used multi-platform Docker containers before, and that makes sense to me.

What I don't understand is how they are running x86 containers on an ARM64 VM? Docker Desktop still works by building a Linux VM and running Docker there. But the VM would be an ARM VM. So, are they running qemu in the ARM VM to emulate an x86 processor in a nested VM?

I had imagined they'd try to do something like run x86 qemu through Rosetta, but it seems like this is not that. And the Apple Hypervisor Framework documentation leaves a bit to be desired, so I'm not sure if you can switch vCPU architecture, but I highly doubt it. (And I thought it was established that Rosetta wasn't emulating VM instructions).

Can anyone shine any light on this aspect?

Re: Tech Preview of Docker Desktop for M1

#132

After reading the article, I still don't quite understand how this works. I've used multi-platform Docker containers before, and that makes sense to me. What I don't understand is how they are running x86 containers on an ARM64 VM? Docker Desktop still works by building a Linux VM and running Docker there. But the VM would be an ARM VM. So, are they running qemu in the ARM VM to emulate an x86 processor in a nested V…

QEMU can (slowly) emulate any architecture on any other architecture. In this case, they're using QEMU to emulate x86-64 on ARM64. No nesting or Rosetta is needed.

Re: Tech Preview of Docker Desktop for M1

#133
post #132

After reading the article, I still don't quite understand how this works. I've used multi-platform Docker containers before, and that makes sense to me. What I don't understand is how they are running x86 containers on an ARM64 VM? Docker Desktop still works by building a Linux VM and running Docker there. But the VM would be an ARM VM. So, are they running qemu in the ARM VM to emulate an x86 processor in a nested V…

QEMU can (slowly) emulate any architecture on any other architecture. In this case, they're using QEMU to emulate x86-64 on ARM64. No nesting or Rosetta is needed.

Why wouldn’t they use Rosetta though? I’d wager the performance of Rosetta would be better than QEMU emulation, but perhaps it’s more optimised for desktop apps

Re: Tech Preview of Docker Desktop for M1

#134

This bit about Multi-platform development is most interesting to me. > Many developers are going to experience multi-platform development for the first time with the M1 Macs. This is one of the key areas where Docker shines. Docker has had support for multi-platform images for a long time, meaning that you can build and run both x86 and ARM images on Desktop today. If multi platform images work, a lot of the concerns…

X86 support is a big one for me. I deal with a lot of customer projects; typically with some kind of dockerized stuff as part of their tool chain. So, being able to run those things as is, is important for me. And I don't see those build systems being updated any time soon to be able to accommodate some Apple only hardware.

Re: Tech Preview of Docker Desktop for M1

#135

Perhaps a dumb question but I'm curious why people don't use a VPS or a cloud linux machine more for Docker/K8s development instead of running Docker locally on a Mac. In my experience Docker Desktop has been such a resource hog, and Apple's hypervisor implementation pretty poor. I much prefer to have all that heavy lifting isolated away from my development machine to keep it responsive and cool.

Without kubernetes, Docker Desktop is fine. Been running it for years on my current and previous mac book pro (the 2012 model). Docker performance has never really been an issue for me. The bundled kubernetes seems to burn a lot of CPU though; so I keep that disabled.

I work with other people in teams and I don't get to tune every project I deal with to be just right for my tastes and hardware. So being able to run their stuff as is with emulation is preferable to me having to customize everything before I get to run it.

Re: Tech Preview of Docker Desktop for M1

#136
post #133
post #132

Earlier quoted context omitted.

QEMU can (slowly) emulate any architecture on any other architecture. In this case, they're using QEMU to emulate x86-64 on ARM64. No nesting or Rosetta is needed.

Why wouldn’t they use Rosetta though? I’d wager the performance of Rosetta would be better than QEMU emulation, but perhaps it’s more optimised for desktop apps

Rosetta is limited to running Darwin/x86-64 user processes on Darwin/ARM64 but Docker needs to run Linux/x86-64 containers/processes on a Linux/x86-64 kernel on a Darwin/ARM64 host.

Re: Tech Preview of Docker Desktop for M1

#137

I've tried one of the preview builds as part of their Developer Preview Program[1] and it's super fast when you're running an arm64 image, as opposed to an amd64 that will automatically be run via qemu (and therefore incur some overhead). By "super fast", I mean I was seeing speeds comparable to running the commands natively on the M1 mac (npm install and a heavy Gulp build). [1] - https://www.docker.com/community/ge…

How close are we to be able to deploy arm64 images to production/AWS/GCP?

Re: Tech Preview of Docker Desktop for M1

#138
post #129

Earlier quoted context omitted.

I don't disagree. In fact, I'm assuming that's a major reason they've not done this sooner. Intel tried to setup a different more efficient architecture with IA64, but they failed there. That being said, with major players like Amazon and Google tinkering with ARM in the cloud and Apple getting ARM into the hands of a lot of developers, we could be on the eve of seeing ARM make a big entrance into the server realm. I…

That reason doesn't make any sense to me. I have been coding since the mid-80's, not having the same local UNIX machine for doing development than what the server was running was quite common in the world of commercial UNIXes. Then I moved into managed languages, where the actual CPU and even underlying OS, only matter to low level coding, again not using the same local OS/CPU combo as the server. Finally, cross comp…

> I have been coding since the mid-80's, not having the same local UNIX machine for doing development than what the server was running was quite common in the world of commercial UNIXes.

Things change. Why is x86 the primary server platform? It isn't a great micro architecture. The fact that ARM and others (Like power pc) have been eating their lunch in terms of price, performance, and power consumption is proof enough of that.

So how do you explain the rise of x86 and the fall of pretty much every other platform on servers?

To me, it's simple. x86 got fast enough on consumer hardware to be able to run the same software that would run on servers. Developers like to test their software locally. Emulators for anything to x86 have been terribly slow.

That's why since about the late 90's pretty much everyone has been running x86 servers.

That you can cross compile isn't really the issue. Even running managed languages isn't the issue. The issue is that there are always differences that are hard to compare when switching platforms if the one you are developing on isn't the same as the one you are targeting.

That's like 90% the reason why most consoles have switched over to x86.

Mobile devices would have gone to x86 were it not for the fact that licensing costs were too high and the performance/watt ratio too low.

Re: Tech Preview of Docker Desktop for M1

#139
post #137

I've tried one of the preview builds as part of their Developer Preview Program[1] and it's super fast when you're running an arm64 image, as opposed to an amd64 that will automatically be run via qemu (and therefore incur some overhead). By "super fast", I mean I was seeing speeds comparable to running the commands natively on the M1 mac (npm install and a heavy Gulp build). [1] - https://www.docker.com/community/ge…

How close are we to be able to deploy arm64 images to production/AWS/GCP?

You can deploy to AWS Graviton machines.

Re: Tech Preview of Docker Desktop for M1

#140
post #132

After reading the article, I still don't quite understand how this works. I've used multi-platform Docker containers before, and that makes sense to me. What I don't understand is how they are running x86 containers on an ARM64 VM? Docker Desktop still works by building a Linux VM and running Docker there. But the VM would be an ARM VM. So, are they running qemu in the ARM VM to emulate an x86 processor in a nested V…

QEMU can (slowly) emulate any architecture on any other architecture. In this case, they're using QEMU to emulate x86-64 on ARM64. No nesting or Rosetta is needed.

But if they are doing that, then why do they need to use the Mac Hypervisor Framework to setup the VM? That wouldn't be required if you were using qemu, would it?

(How you mention it would be the simplest possible thing that would work)

Post reply on HN