Docker native support on OSX

I know there are some know issues about the extensive usage of the clone system call from docker. At the moment there is an issue #9 on github without solution...

Is there a plan to support natively docker on OSX kernel?

Could you use vfork? I believe vfork is equivalent to clone with the flags CLONE_VM | CLONE_VFORK | SIGCHLD passed in.

Actually only linux distros support docker natively...but on Mac OS X, devs must install virtualbox and user docker-machine.. :/

already 4 years past. Mac Os x will be the best OS for developers once they added docker native support
I can only repeat the last comment! Nativ support is absolutly needed for Docker! Even on the Apple M1 its quite slow and container interactions are often delayed for a couple of seconds (tested with qemu and hyperkit - both perform bad).
Docker is not software made by apple, its made by the Community, SUSE and Docker Inc.
Anyways it would be awesome if Apple would interact even more with the Docker community or at least provide a framework that can natively run containers and is compatible with the container open-build format. Also support for docker-compose would be awesome.

+1 Absolutely needed.

Networking is completely busted with the current approach, and I've never been a fan of MacOS filesystem support either.

Adding the "me too". It'd be a dev life changing!

Yes, I think this is particularly important for e.g. Java-based containers, where the contained applications are in fact platform independent and could run natively on Mac OS outside of Docker, but are forced into emulation when running inside Docker.

Any plans for this?

Dear Apple,

We hope this message finds you well. We are writing to express our strong desire for native support of Docker on Mac OS. As you may already know, Docker is an incredibly popular platform for building, shipping, and running applications and services.

The benefits of native support for Docker on Mac OS are numerous and wide-ranging. It would allow developers to work more efficiently and productively, as they would be able to run their applications and services seamlessly on Mac OS without the need for additional tools or configurations.

Moreover, Docker's compatibility with multiple platforms would enable Mac OS users to collaborate more easily with other teams and organizations, even if they use different operating systems. This would lead to increased productivity, efficiency, and innovation.

We hope that you will consider our request for native support for Docker on Mac OS. We believe that this support would make a significant impact on the development community and would further solidify Mac OS as a leader in the technology industry.

Thank you for your time and consideration.

I second this. I have a shared MongoDB setup (docker-compose) that I use to work on platform observability. It is a 5M insert-read benchmark (go-ycsb, workloada) to gauge performance metrics. The same benchmark running with the same thread count of 4 takes around 8.5 minutes consuming around 10% of its battery of 76Wh on my zephyrs g14 with 5800hs while on a baseline 14" m2 max MacBook Pro takes a 16.5 minutes draining 15% of its battery. Docker Desktop is set with 8C and 22gb ram using virtiofs.

Following is a more verbose output for the results (4.18.10):

ZephyrusG14-2021,r7-5800hs,48gb,2tb,runs-GNU Linux, PopOS 22.04 LTS distro %10 consumed and workload done in 8m27.15s with shards consuming the following in RAM:

  • 6.143gb
  • 7.141gb
  • 7.342gb

24.18gb worth of data written and pruned

MacBookPro-14"-late2022,m2max,32gb,1tb %15 consumed and workload done in 16m33.473s with shards consuming the following in RAM:

  • 4.911gb
  • 5.882gb
  • 5.815gb

24.15gb worth of data written and pruned

Sharded mongodb cluster is comprised of 3 hards with one replica each (two replica sets) the load is executed through the mongo query router with go-ycsb as the following:

./go-ycsb load mongodb -P workloads/workloada -p recordcount=5000000 -p mongodb.url="mongodb://localhost:34211" mongodb.namespace="ycsb.ycsb" --threads 4 --target 30000

All in all, this is disappointing considering the said g14 is 2 year old ddr4 equipped machine with its only edge being its disk (Solidigm P44 Pro 2tb, partitioned for using half its capacity to always have it running in SLC mode) which is a quite fast nvme. Regardless, I am torn between keeping the said MacBook Pro in question as it's not able to perform as well as my linux running laptop. I had imagined that a native Docker engine solution has been introduced by now, but I was wrong :(

Here is my Solution, that worked 100% and guaranteed, Simply sell you Apple Hardware and run Linux. It's really just as simple as that. No Joke now, these docker and container problems using macOS made me sell my Mac Computer again. I really have no time to wait for Apple and their endless stories deciding to support a 3rd party product or not. And no, we still don't have a public answer from Apple here. Since 5 years at least, I'm waiting for an answer here.

Docker is out since so long. And despite that macOS is UNIX under the hood, Apple was not able to run docker natively, nor any other container engine like podman, rkt etc. Maybe apple should start with their own "nspawn". Like Linux did many years ago. Why should I stay in the Apple/MacOS Eco System if there is so less support??? Please give me a Reason why I should pay 1000$,2000$ or 5000$ for an Apple computer!?!??! From a developers' perspective, macOS and Apple Computers are sadly the dumbest crap you can buy right now. Even much worse than Windows on an old AMD Athlon CPU, no joke I would prefer that, and why, as it works as intended and as it should be. The only point where it makes sense to buy an Apple Computer as a Developer is if you want to develop software that only runs on MacOS/iOS/tvOS etc., and basically that already the whole story. If you want to develop something else, go buy yourself a PC as second machine ...

Let me give you some more reasons why Apple computers are dump as hell.

  1. If your Apple ARM computer breaks or behaves unusually, In most cases you need a second Mac Computer to reinstall the broken one, see the Apple Configurator2 tool. Who the hack wants that, who came across with this more than stupid idea to implement it like that? Really, please kill this developer or the person that came across with this Idea.

  2. Go with standardized Ports on the Hardware. Nobody wanted lightning, nor any other proprietary stuff.

  3. Now it's 2023, in the current version of MacOS Apple is still shipping the bash console in version 3.2, that's from 2003 ... This shows me as a developer that apple does not even maintain their Software stack fine. Some tools that come with the OS are simply rotten since many OS releases. Instead, Apple's "Think Different" strategy here is: "The people will use brew to install the current version of bash, we don't have to take care onto this..." Just another reason why I consider Apple products to be stupid.

  4. Even with the M1 Ultra or the M2, Apple Computers are still much slower than a conventional gaming PC's. I swear that an AMD 7900X and an Nvidia 4070 will smoke any of these Apple ARM Chips. And please don't tell me something about performance per watt. I don't care if the CPU drain 25 Watts or 125 Watts. I want a System that is badass fast. Especially if I pay 2000-5000$ for it. I also don't understand why Apple cares about this so much, you folks are selling the most expensive computers on the planet, and you come along with a performance from the years of 2018-2020 ... What=!?

Please do yourself a favor, skip the whole Idea of being a fancy computer guy with an Apple computer, you look like a clown in the end. Simply use Linux, be happy, use up-to-date Software and development tools. Besides, you get an up-to-date bash :D

My bet now is that Apple will reply onto this, but not with an answer, they will change over again from zsh to csh (cornshell) xD which is even more stupid than zsh ... 100% sure onto that.

"Think Different", but don't Think Apple.

Yes please!! I've just purchased a macbook and was shocked this wasn't already a feature. Silly me for assuming.

The lack of native Docker support makes me want to transition to Linux. I really hope Apple will add native Docker support. Colima (Homebrew / brew install colima / colima ssh / ~/.colima/default/colima.yaml / docker cli works from Mac Terminal) works but getting the shares and folders to work correctly is a real hassle. With vz the disk sharing works, with qemu the SMB shares work.

Docker native support on OSX
 
 
Q