Live data from Hacker News

Tech Preview of Docker Desktop for M1

docker.com

171–180 of 231 posts

Re: Tech Preview of Docker Desktop for M1

#171
post #58

Earlier quoted context omitted.

... if docker ran “natively” it’d mean using kernel hooks provided by xnu, which means you’d be able to run another instance of macOS in a container. How is it so many people use docker but have zero fucking clue about how it works?

> which means you’d be able to run another instance of macOS in a container This is not true, for multiple reasons. Strictly speaking it only means you'd be able to run another instance of Darwin in a container. And, as you surely know because your tone of voice implies you bear immense knowledge, a Docker-style container is not a full OS: it doesn't run an init or normal system daemons, so it wouldn't even be a full…

> it doesn't run an init or normal system daemons

There’s no technical limitation stopping you from running init or system daemons inside a container, it’s just an anti-pattern and missing the point of a container in most cases.

Re: Tech Preview of Docker Desktop for M1

#172
post #5
post #3

Earlier quoted context omitted.

Docker Desktop already ran on Macs. This is specifically for the new Apple Silicon support (M1). It's not native, technically, but it feels native the way Docker Desktop works. Basically they manage the VM for you, so you don't have too.

Can this run a container of windows on Mac M1?

Can you run a container of Windows on an x86 machine? The answer is no, and for the same reason it won’t work on ARM. A “container” is not a virtual machine, you can only run the same Linux executables you would on a normal Linux system.

That said, as another person commented, you can run Windows for ARM in a VM on an Apple M1.

Re: Tech Preview of Docker Desktop for M1

#173
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.

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)

Docker Desktop uses Hypervisor.framework to run ARM containers on ARM. Docker Desktop uses QEMU to run x86 containers on ARM.

Re: Tech Preview of Docker Desktop for M1

#174

Earlier quoted context omitted.

This whole territory is pretty much unknown right now. Whether we can have reasonably performant x86 containers is up in the air.

I'd expect it to be exactly as performant as qemu's x86 emulation always is. The M1 is new, but qemu is not.

So it means plain old binary translation without hardware assist. I wonder that whether QEMU's binary translation is not optimized well nowadays because no one uses it for production (we use with VT-x/EPT or AMD equivalent).

Re: Tech Preview of Docker Desktop for M1

#175

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

It's been taking a while, and the kubernetes is still 'starting...' - Did you have the same issue?

Re: Tech Preview of Docker Desktop for M1

#176

Earlier quoted context omitted.

Note, Docker will run x86 containers via qemu, so you can still use them. They'll just be slower.

This whole territory is pretty much unknown right now. Whether we can have reasonably performant x86 containers is up in the air.

Yes, it's definitely "performant" if by "performant" you mean "exactly matching the well-established performance of qemu emulation" which means: slower than Rosetta2 with higher CPU/memory/power usage but still functionally correct for the most part.

If by "performant" you mean "as fast as it used to run on x86 Mac hardware" than the answer is: No, it's emulation, and it's slower than Rosetta2.

Re: Tech Preview of Docker Desktop for M1

#177

Earlier quoted context omitted.

> has given support to Docker to implement this quickly Any proof? As far as I know apple, they are not that developer/open source supportive.

Nope just a guess, wonder if anyone can confirm from Docker

I can't find a link but I'm pretty sure a few of the devs have mentioned working closely with Apple on a couple showstopper bugs they had run into.

Re: Tech Preview of Docker Desktop for M1

#178
post #146

Wow, that was fast. I was expecting to wait unil January. Key takeaway for me is the ability to run/build both x86 and Arm images on a M1. Can't see any reason M1s can't be used for everyone at my work now. Very nice.

Docker have had inside access to the whole M1 release since before it was announced. This is incredibly slow.

Adobe and Microsoft took months/years after Apple's PowerPC and Intel transitions... complex software is complex, it's not like they get the new machines, flip a few toggles, and hit compile.

Re: Tech Preview of Docker Desktop for M1

#179
The battery impact of having Docker running with a few containers seems greatly decreased on Apple Silicon. I used to be reluctant on my Intel MBP to use Docker if I was out and about - working in a cafe between meetings for example - because my battery life would shrink immensely. That doesn't seem to apply in the same way on m1 (running ARM64 containers) which is a huge win.

Re: Tech Preview of Docker Desktop for M1

#180

Earlier quoted context omitted.

> has given support to Docker to implement this quickly Any proof? As far as I know apple, they are not that developer/open source supportive.

Nope just a guess, wonder if anyone can confirm from Docker

It seems that Apple's contribution for OSS is weak even though they used. I heard that Apple is Java shop, but they don't contribute to ship JVM for Apple Silicon.
Post reply on HN