I wish Apple would give Docker some love like Microsoft does. Using Docker with WSL is a breeze, and it runs so much better than MacOS.
And as an advantage you get access to Linux package managers which are so much better than brew. Brew is good, but Linux package managers like pacman and apt are so much better. Having a proper Linux distribution open in one window while I play 'Call of Duty' in another, is one reason why I've moved to Windows again.
The only problems I’ve had with docker slowness (though it’s been a very significant problem) is shared file system performance. It’s made many use cases and tools that are slow to begin with (like webpack) basically unusable for a development workflow.
So the main thing Apple could do to show some love to docker is build out full apfs support in the Linux kernel. I have no clue how much work that entails but presumably it’s pretty massive, and it seems totally unlike them. Maybe one day they’ll have a come to Jesus moment like Microsoft and start caring about developers (non-iOS developers) but I don’t really see it happening.
> Brew is good, but Linux package managers like pacman and apt are so much better
I used starting fresh on the M1 as an excuse to give MacPorts a go, and I like it much better than Homebrew. There's some smaller packages that aren't on MP, but all the big stuff is there and to me it feels much more like a Linux package manager.
Have there been some updates recently? About a year ago we were trying to use Docker on a windows host at work, and dealing with things like file system paths was a nightmare
Huh. I've seriously used... I dunno, maybe five Linux package managers, on workstations and servers alike, plus poked at a couple others, and the only one I'd almost rather use day-to-day than Brew is Portage, but even that, probably not.
I like having the system strictly separate from my crap, and I think the UI is fairly good. The variety of packages available out-of-the-box is outstanding. I miss it when I'm on Linux, now, in a workstation-not-server context (yes, I know, there's LinuxBrew, but the package set is much smaller and less well-maintained). I started on MacPorts but got sick of it borking itself every few months such that it was faster to nuke the directory and reinstall everything than to figure out what it'd screwed up this time (granted, that was about a decade ago, maybe it's great now).
Brew gives off all kinds of signals of being something I'd hate (cutesy; a system tool written in Ruby; breaks with norms) but I like it a ton.
I'm 100% with you. Moved from MacOS to Windows because of WSL1.
Tangent warning:
When WSL2 came out I ended up moving away from WSL and moved to running my development environment inside a VMWare VM and connecting to it via VSCode remote ssh development feature (the same one used for WSL). This is essentially a manual version of WSL2, something people have been doing for ages.
Now, whether I develop from Windows or MacOS, I am always connecting to my Linux VM. If I need to run docker, it's running in that VM.
I got to the point now where I forward my SSH port from my public IP to my desktop PC at home. When I am away from home (e.g. working in the office with my laptop), I connect to my desktop (via ssh on my public IP) and due to the seamless integration VSCode has for remote development, It feels like everything is running on my local device.
The PC is of course handling compilation, intellisense and all that good stuff while my laptop is essentially a thin client. The laptop now runs faster, has a longer battery life, doesn't spin up the fans and also doesn't need to be upgraded.
My home PC, electricity and internet bills are also tax deductible because I use them for work purposes.
I'm definitely interested in WSL for developing, but last time I tried it a while back (WSL2 just came out I think), there was basic functionality missing e.g. I couldn't write and run my own SystemD services. Has the situation improved since then?
When you say "proper Linux distribution", I assume that's still CLI only? Do you develop with e.g. emacs, vim on WSL, or do you have some IDE with remote running and debugging into WSL? Or have a missed a trick and in fact X/Wayland applications can be run on WSL?
Am I the only one who, after installing some brew tool, every bin in /opt/homebrew is immediately kill -9’d at launch, and then I have to brew list | xargs brew reinstall?
Seems to be some signing issue but it’s only happened to me twice and I didn’t have time to properly investigate at the time...
Do you use any other virtualization software along side HyperV? We have a lot of legacy stuff that integrates with VirtualBox, but wanted to start edging towards Docker.
However, when I last spent a couple of sprints attempting to get them working side-by-side, it was a pretty big failure. I couldn't get VirtualBox 6.0 running without falling back to soft virtualization which was painfully slow (booting a Ubuntu box took the better part of an hour).
> I wish Apple would give Docker some love like Microsoft does
It is my hope that Docker continues to accelerate down its current path toward replacement by other systems such as podman.
I suspect that Apple has little motivation to add a Linux kernel alongside the existing BSD-compatible kernel, even though macOS does have a built-in hypervisor framework/API.
BSD containers (e.g. jails) seem like a better fit than Linux containers (e.g. docker, lxc) for a BSD-based system.
Apple is not giving proper love to their breakthrough laptop chipset. They amazed the world with "neural net on chip" for ML, even mentioning Tensorflow explicitly in its launch. Here's the real deal: getting anything Tensorflow related to even compile on M1 is nothing short of a miracle. Yes, Apple has a binary version (yuck) of TF you can download, but that's not good enough as many projects need specific versions and not everyone (ie OSS devs) can spend that much effort on a fringe tech.
If I were Apple (ehem) I'd spend a small but meaningful budget supplying devs to projects like Docker or TF to help speedup M1 adoption. Given that the chip market is open for grabs I'd say it could give Apple a much stronger headstart with their in-house silicon strategy, even if that means helping improve products or the bottom-line for well-established corps, some of them competidors.
It’s not too difficult to get a Linux VM running on top of MacOS on the M1. Then you can do whatever you want on your M1 Mac and have a full Linux distribution in another window.
The problem is that Apple does not want to spend money where they don't absolutely have to. In their mind Docker is someone else's problem and if that 3rd party will also pay salaries and taxes, it's perfect for Apple. I am sure once Docker commit resources and solve it, the Apple will be boasting how great Docker works on their platform.
I love Docker, but I gave up on using it on Mac. I put a lot of effort into fighting it, but ultimately, it seems some of the issues are just too fundamental. I like to call the Docker-for-Mac experience the MacBook Airplane. At some point, your fans will start spinning, your productivity will crash, and you'll spend the next three hours sifting through open GitHub issues from 2017 where everyone is still complaining about the same problems.
I'm all in on VSCode Remote SSH development now. It works extremely well, I barely even notice I'm not programming on my own computer, and my laptop no longer sounds like a passenger jet taking off. It was very easy to setup. Our stack is still very Docker heavy, but using the containers on a remote machine makes it much more tolerable to work with.
At work we used Docker for local development but not production, purely because we have some ageing internal systems and it made it easier to deal with different versions of PHP, MySQL, etc.
After numerous Docker woes on Mac I ended up just spending a tiny bit of time installing and configuring Nginx and various PHP-FPM and MySQL versions from MacPorts. It was easy, I learned a lot more about the platforms we use, and because they're all socket-based they can all be running at once. Just added a couple of bash functions to bring everything up and down.
Sure my dev environment isn't the same as prod, but it wasn't when I was using Docker either.
Totally agree. Docker for Mac performance is just unbearable when dealing with a semi-large webapp. I recently moved to remote development – macOS with Ubuntu running in VM (VMware) via Vagrant. I edit code using VSCode & Vim (via SSH & tmux tabs in iTerm2).
Based on my benchmarks it's more than twice as fast as Docker for Mac – and only minimally slower than native Docker running on a Dell XPS.
I'm enjoying this setup so much that I'm considering moving all my dev-related tools to a VM (which will hopefully allow me to get rid of homebrew too).
I did the same after constantly yelling at docker. It’s amazing what vscode has been able to pull off to make ssh feel local. I’ve tried other solutions before and they’ve all had noticeable lag. The only time I notice is if I’m remote and on a cell connection or airplane.
The one thing I wish they’d improve was re-establishing a connection after the computer sleeps. Really annoying to have to reload the entire window, sometimes.
Does anyone know if there’s a parallel workflow in PyCharm? That is, running on a remote docker container. I haven’t yet been able to get this working but it’d be a vastly superior workflow for my use cases in ML/DS.
> Some container disk I/O is much slower than expected. See docker/for-mac#5389. Disk flushes are particularly slow due to the need to guarantee data is written to stable storage on the host.
Huh. This could be problematic given that Docker disk performance on macOS was already dreadful on intel machines. I would love to see Apple give this some attention.
At some point, Docker switched from being an open source, free software company, to producing stuff like these Docker Desktop apps that are a) nonfree, b) not even source available, and c) contain spyware in them that report back to them your activities in the app silently and without your consent. (On crashes, it even uploads some of your network traffic in the form of pcaps.) Most people didn't notice this shift, as Docker Desktop (the app in TFA) still has a github repo, et c. It just doesn't have any source in it.
Not being open source I can't easily tell what sort of data it uploads during usage (but I did inspect the crashdump it uploads, and HOOOO BOY is it a fuckton of sensitive data about your running system), so being someone who usually works under NDA, even installing this on my machine is a liability risk, as it could transmit information about my customers.
You're better off using the actually open source docker command line client (installable from your favorite package manager) and setting DOCKER_HOST in your environment to something like "ssh://root@remotehost" (set up ssh key auth first, and install the docker daemon on remotehost) which will serve you a lot better, with the added benefit of running at full, non-emulated speed (and pulling images/packages/pushing/etc will happen from a datacenter pipe, not your puny leaf node on wi-fi).
I recently left the Mac ecosystem and bought myself a System 76 laptop. I do a lot of server-side development and running Docker at native speed is a big productivity boost for me. I really do hope they get this sorted out, it's a great technology that has measurably improved the local development experience.
I wonder if services like https://garden.io/ will see more business as a result of these issues? That or more folks will move to Windows or Linux as their primary development machine and reach for cloud-based Mac environments when they need to develop for Apple?
We switched over to Garden a year ago from a local docker-compose setup for dev. Garden has definitely had its rough spots but it works most of the time and it’s pretty amazing when it does.
Run your dev environment remote and instantly rsync file changes and hot reload services. I’ve had an M1 Mac since launch day and not missed a beat since we don’t depend on local docker.
Curious on how Docker runs on M1, it's well known for being an horrendously slow piece of software on Apple computers, draining battery life like crazy. Any feedback on M1 Docker so far?
I wish apple would support a couple extra kernel features (like bind mounts) so we can have native macOS 'containers' instead of this nonsense. Running MySQL by running qemu inside a Linux VM is just insane. Nix can fill some of the same roles, but it doesn't work on M1 yet
> Some container disk I/O is much slower than expected. See docker/for-mac#5389. Disk flushes are particularly slow due to the need to guarantee data is written to stable storage on the host. This is an artifact of the new virtualization.framework in Big Sur.
If I don’t care about persistence of my containers (e.g. I’m just running ephemeral tests), is there a way to disable Docker for Mac / Virtualization.framework’s cache-flushing behaviour entirely? I.e. to get the same behaviour as mounting Linux ext4 with -o nobarrier,data=writeback?
Does Virtualization.framework maybe have first-class support for swap volumes — i.e. inherently ephemeral volumes, that don’t need to be flushed to the host?
I don't understand why Docker Desktop e.g. Docker for Mac and Docker for Windows is available for free. I think it's a value added service and is executed beautifully and would be a fair way for the company to generate revenue.
How do people use Docker on Mac? It's so slow for me I've started to use my X220 (Linux) as it's faster than my 2018 MBP.
We use containers inc. a MySQL container and accessing it is incredibly slow, with a request taking 5-10seconds that's instant on the production server.
I've heard that Docker Sync can improve this, is it worth a try?
I've never found it reasonable to virtualize on Apple systems. Apple optimizes for security, specificity, and bubblegum usability.
Technical limitations aside, from a security perspective it is not a good idea to run servers on the same system that you write code from. I humbly suggest taking the time to push code to your dedicated Linux server, otherwise you might inadvertantly be putting your company out of compliance by exposing your dev system on any given network.
Docker is for running Linux apps. I honestly don't see the appeal of abstracting away the Linux VM via Docker for Mac, especially if it has issues like filesystem performance. I have been running docker inside a Linux VM in VMWare Fusion on my Intel MacBook. Surely it would be possible to just have a plain Linux VM on an M1 Mac and run Docker inside it?
Very excited about this, been wrestling pretty hard with the previous release, it had lots of issues, to the point where I was SSHing into my old laptop to run builds.
Really hoping those days are behind me with this, it made me feel a bit foolish for springing for the mini as quickly as I did.
Edit: Nope, segfault yet again. God damn, well you get what you pay for!
File access on preview7 was atrocious. It would take a seeded postgres-debian container 3 minutes to start (maybe 64 megs of data inside) if you kept the postgres volume on the local disk inside the container!
Can this version run the official MySQL images under QEMU? I had everything working on the last preview version except for MySQL; they would immediately crash with a Go error.
[+] [-] me551ah|5 years ago|reply
[+] [-] cactus2093|5 years ago|reply
So the main thing Apple could do to show some love to docker is build out full apfs support in the Linux kernel. I have no clue how much work that entails but presumably it’s pretty massive, and it seems totally unlike them. Maybe one day they’ll have a come to Jesus moment like Microsoft and start caring about developers (non-iOS developers) but I don’t really see it happening.
[+] [-] deergomoo|5 years ago|reply
I used starting fresh on the M1 as an excuse to give MacPorts a go, and I like it much better than Homebrew. There's some smaller packages that aren't on MP, but all the big stuff is there and to me it feels much more like a Linux package manager.
[+] [-] skohan|5 years ago|reply
Have there been some updates recently? About a year ago we were trying to use Docker on a windows host at work, and dealing with things like file system paths was a nightmare
[+] [-] gh-throw|5 years ago|reply
I like having the system strictly separate from my crap, and I think the UI is fairly good. The variety of packages available out-of-the-box is outstanding. I miss it when I'm on Linux, now, in a workstation-not-server context (yes, I know, there's LinuxBrew, but the package set is much smaller and less well-maintained). I started on MacPorts but got sick of it borking itself every few months such that it was faster to nuke the directory and reinstall everything than to figure out what it'd screwed up this time (granted, that was about a decade ago, maybe it's great now).
Brew gives off all kinds of signals of being something I'd hate (cutesy; a system tool written in Ruby; breaks with norms) but I like it a ton.
[+] [-] apatheticonion|5 years ago|reply
Tangent warning:
When WSL2 came out I ended up moving away from WSL and moved to running my development environment inside a VMWare VM and connecting to it via VSCode remote ssh development feature (the same one used for WSL). This is essentially a manual version of WSL2, something people have been doing for ages.
Now, whether I develop from Windows or MacOS, I am always connecting to my Linux VM. If I need to run docker, it's running in that VM.
I got to the point now where I forward my SSH port from my public IP to my desktop PC at home. When I am away from home (e.g. working in the office with my laptop), I connect to my desktop (via ssh on my public IP) and due to the seamless integration VSCode has for remote development, It feels like everything is running on my local device.
The PC is of course handling compilation, intellisense and all that good stuff while my laptop is essentially a thin client. The laptop now runs faster, has a longer battery life, doesn't spin up the fans and also doesn't need to be upgraded.
My home PC, electricity and internet bills are also tax deductible because I use them for work purposes.
[+] [-] 600frogs|5 years ago|reply
When you say "proper Linux distribution", I assume that's still CLI only? Do you develop with e.g. emacs, vim on WSL, or do you have some IDE with remote running and debugging into WSL? Or have a missed a trick and in fact X/Wayland applications can be run on WSL?
[+] [-] countmora|5 years ago|reply
[+] [-] cyberpunk|5 years ago|reply
Seems to be some signing issue but it’s only happened to me twice and I didn’t have time to properly investigate at the time...
[+] [-] ajford|5 years ago|reply
However, when I last spent a couple of sprints attempting to get them working side-by-side, it was a pretty big failure. I couldn't get VirtualBox 6.0 running without falling back to soft virtualization which was painfully slow (booting a Ubuntu box took the better part of an hour).
[+] [-] musicale|5 years ago|reply
It is my hope that Docker continues to accelerate down its current path toward replacement by other systems such as podman.
I suspect that Apple has little motivation to add a Linux kernel alongside the existing BSD-compatible kernel, even though macOS does have a built-in hypervisor framework/API.
BSD containers (e.g. jails) seem like a better fit than Linux containers (e.g. docker, lxc) for a BSD-based system.
[+] [-] eecc|5 years ago|reply
[+] [-] ojosilva|5 years ago|reply
If I were Apple (ehem) I'd spend a small but meaningful budget supplying devs to projects like Docker or TF to help speedup M1 adoption. Given that the chip market is open for grabs I'd say it could give Apple a much stronger headstart with their in-house silicon strategy, even if that means helping improve products or the bottom-line for well-established corps, some of them competidors.
[+] [-] m463|5 years ago|reply
Too bad because a native apple docker would be really really useful. imagine:
(I'm not talking about the current docker on mac which runs linux in a vm)[+] [-] ogre_codes|5 years ago|reply
Call of Duty is a whole other problem.
[+] [-] yrro|5 years ago|reply
Not if your Windows users have to use Direct Access to connect to your container registry...
[+] [-] jayfk|5 years ago|reply
Last time I checked, the terminal was horrible to work with.
[+] [-] crb002|5 years ago|reply
[+] [-] varispeed|5 years ago|reply
[+] [-] bunfunton|5 years ago|reply
[+] [-] cageface|5 years ago|reply
[+] [-] pkulak|5 years ago|reply
https://www.protondb.com/app/2620
[+] [-] chatmasta|5 years ago|reply
I'm all in on VSCode Remote SSH development now. It works extremely well, I barely even notice I'm not programming on my own computer, and my laptop no longer sounds like a passenger jet taking off. It was very easy to setup. Our stack is still very Docker heavy, but using the containers on a remote machine makes it much more tolerable to work with.
[+] [-] deergomoo|5 years ago|reply
After numerous Docker woes on Mac I ended up just spending a tiny bit of time installing and configuring Nginx and various PHP-FPM and MySQL versions from MacPorts. It was easy, I learned a lot more about the platforms we use, and because they're all socket-based they can all be running at once. Just added a couple of bash functions to bring everything up and down.
Sure my dev environment isn't the same as prod, but it wasn't when I was using Docker either.
[+] [-] pchm|5 years ago|reply
Based on my benchmarks it's more than twice as fast as Docker for Mac – and only minimally slower than native Docker running on a Dell XPS.
I'm enjoying this setup so much that I'm considering moving all my dev-related tools to a VM (which will hopefully allow me to get rid of homebrew too).
[+] [-] dawnerd|5 years ago|reply
The one thing I wish they’d improve was re-establishing a connection after the computer sleeps. Really annoying to have to reload the entire window, sometimes.
[+] [-] skrause|5 years ago|reply
This problem has been solved with the M1 MacBook Air.
[+] [-] Apofis|5 years ago|reply
[+] [-] jacobzweig|5 years ago|reply
[+] [-] e40|5 years ago|reply
[+] [-] giuscri|5 years ago|reply
[+] [-] lupire|5 years ago|reply
[+] [-] nicoburns|5 years ago|reply
Huh. This could be problematic given that Docker disk performance on macOS was already dreadful on intel machines. I would love to see Apple give this some attention.
[+] [-] sneak|5 years ago|reply
Not being open source I can't easily tell what sort of data it uploads during usage (but I did inspect the crashdump it uploads, and HOOOO BOY is it a fuckton of sensitive data about your running system), so being someone who usually works under NDA, even installing this on my machine is a liability risk, as it could transmit information about my customers.
You're better off using the actually open source docker command line client (installable from your favorite package manager) and setting DOCKER_HOST in your environment to something like "ssh://root@remotehost" (set up ssh key auth first, and install the docker daemon on remotehost) which will serve you a lot better, with the added benefit of running at full, non-emulated speed (and pulling images/packages/pushing/etc will happen from a datacenter pipe, not your puny leaf node on wi-fi).
[+] [-] mistyfud|5 years ago|reply
I wonder if services like https://garden.io/ will see more business as a result of these issues? That or more folks will move to Windows or Linux as their primary development machine and reach for cloud-based Mac environments when they need to develop for Apple?
[+] [-] qeternity|5 years ago|reply
Run your dev environment remote and instantly rsync file changes and hot reload services. I’ve had an M1 Mac since launch day and not missed a beat since we don’t depend on local docker.
[+] [-] Zealotux|5 years ago|reply
[+] [-] bouk|5 years ago|reply
[+] [-] derefr|5 years ago|reply
If I don’t care about persistence of my containers (e.g. I’m just running ephemeral tests), is there a way to disable Docker for Mac / Virtualization.framework’s cache-flushing behaviour entirely? I.e. to get the same behaviour as mounting Linux ext4 with -o nobarrier,data=writeback?
Does Virtualization.framework maybe have first-class support for swap volumes — i.e. inherently ephemeral volumes, that don’t need to be flushed to the host?
[+] [-] Thomaschaaf|5 years ago|reply
[+] [-] Accacin|5 years ago|reply
We use containers inc. a MySQL container and accessing it is incredibly slow, with a request taking 5-10seconds that's instant on the production server.
I've heard that Docker Sync can improve this, is it worth a try?
[+] [-] Tepix|5 years ago|reply
[+] [-] dustinmoris|5 years ago|reply
[+] [-] dumpsterdiver|5 years ago|reply
Technical limitations aside, from a security perspective it is not a good idea to run servers on the same system that you write code from. I humbly suggest taking the time to push code to your dedicated Linux server, otherwise you might inadvertantly be putting your company out of compliance by exposing your dev system on any given network.
[+] [-] sigjuice|5 years ago|reply
[+] [-] b1gtuna|5 years ago|reply
[+] [-] TameAntelope|5 years ago|reply
Really hoping those days are behind me with this, it made me feel a bit foolish for springing for the mini as quickly as I did.
Edit: Nope, segfault yet again. God damn, well you get what you pay for!
[+] [-] pkilgore|5 years ago|reply
Intel -- instant. Hope they fixed it!
[+] [-] deergomoo|5 years ago|reply
[+] [-] ryanSrich|5 years ago|reply