Live data from Hacker News

Docker for Mac Without Docker Desktop

github.com

71–80 of 198 posts

Re: Docker for Mac Without Docker Desktop

#71

Has anyone done any filesystem speed comparisons on any of these? Mounting volumes on Mac in Docker Desktop is... not great. Anyone found any good comparisons?

FWIW, I recently switched from an Intel to an M1 Macbook, and found shared volumes with Docker Desktop were unusably slow (previously, I'd used VirtualBox host docker and shared files into it via NFS).

However, using https://mutagen.io/ to keep the container in sync has worked remarkably well - it's greatly improved the speed of the container.

Re: Docker for Mac Without Docker Desktop

#72
I've done most of my dev work on my physical Windows box using Docker Desktop, but have access to a robust cloud VM network where all my Unix work is done. The end result of a dev process is an image regardless of what tool you used, right? So how does Docker know if you've used Windows or Unix to write and test a given image? Is there metadata written into the image?

Re: Docker for Mac Without Docker Desktop

#73
post #37

I know people doing docker dev are generally targeting a Linux of some sort, but why the heck doesn't the macOS kernel support native containerization? Come on Apple. Microsoft can do it. edit: this seems like a new development since my last whine/complaint on this topic: https://macoscontainers.org/

Indeed, with windows' linux subsystem I have to say working from M$ sounds reasonable, maybe even better than dealing with Mac OS X half-baked package managers and subpar docker experience.

It used to be that Windows had a better UX than OS X (imho at least), but nowadays they're equally crap and they can't compare with what's available on linux.

With two machines, I'd still pick Windows for gaming dev and linux for everything else.

With three machines, I'd add a screen-less mac mini to do iOS related builds.

Re: Docker for Mac Without Docker Desktop

#74
post #70
post #37

I know people doing docker dev are generally targeting a Linux of some sort, but why the heck doesn't the macOS kernel support native containerization? Come on Apple. Microsoft can do it. edit: this seems like a new development since my last whine/complaint on this topic: https://macoscontainers.org/

Quoted post unavailable.

I have worked at 4 small-to-mid-sized tech companies now and only one didn't have every software engineer on Macs with Docker.

I don't disagree that the built-in tools on Mac leave a lot to be desired, but you can also just brew install things and clearly Docker has gone to a lot of effort to make this all work on Mac, so the demand is there.

I switched to Linux for the current company, and was expecting fewer Docker oddities and better battery life, but I seem to actually have way more issues now, which - without sinking a week or more into investigating transient issues - I attribute to it not being isolated in a VM.

I often have to reboot my machine just to get basic DNS resolution working from inside a container

Re: Docker for Mac Without Docker Desktop

#75
post #70
post #37

I know people doing docker dev are generally targeting a Linux of some sort, but why the heck doesn't the macOS kernel support native containerization? Come on Apple. Microsoft can do it. edit: this seems like a new development since my last whine/complaint on this topic: https://macoscontainers.org/

Quoted post unavailable.

> macOS is mainly targeted at secretaries, managers and artists.

Counterpoint: I've never seen someone in the Bay Area developing on a Windows machine, in any company I've worked at. In my experience, locally, it's more like 95% Mac, 5% Linux, and 0% Windows.

Now, I know that neither of our anecdotes represent the state of the world in general, but the notion that "Macs are for non-techies" is laughable on the face of it.

Re: Docker for Mac Without Docker Desktop

#76

Earlier quoted context omitted.

Yeah :( Ever since I switched to an M1, I haven't found a way to reliably build and run x86_64 containers on it. Docker desktop with Qemu is not just painfully slow, it's also very buggy and some containers just can't be built without crashing. Is there any alternative?

Try UTM https://mac.getutm.app/ Run x86 Linux of your choice there, install Docker inside there. Run it there.

You'll get the same issues, since utm uses qemu. Tried it a few days ago with x64 linux only to have the os crash while copying stuff over smb

Re: Docker for Mac Without Docker Desktop

#77
post #5

I've been exploring 2 alternatives (podman and colima) to replace my normal docker workflow, which is just building and running containers locally, sometimes with docker-compose. I started with podman but had issues with 2 main pieces of my workflow: docker-compose (or podman-compose) and shared volumes (with `run -v`). Switched over to colima and those worked out of the box for me ("brew install docker; brew install…

Podman works with docker-compose 1.x only and needs some finagling to work. I have this wrapper script as podman-compose #!/bin/bash set -e tmpdir=$(mktemp -d) port=$(podman system connection ls | grep -Eo 'localhost:\d+' | head -1 | cut -d: -f2) [[ -n $port ]] || exit 1 ssh -fnNT -L"$tmpdir/podman.sock":/run/user/1000/podman/podman.sock -i ~/.ssh/podman-machine-default ssh://core@localhost:"$port" -o StreamLocalBind…

Afaik podman-compose doesn't support "docker compose run" to do one-off stuff in a new container? Is there some alternative?

I do it all the time now, have the entire dev flow dockerized. So I run tests, lints, fixers, migration etc all through docker compose.

Re: Docker for Mac Without Docker Desktop

#78

I've done most of my dev work on my physical Windows box using Docker Desktop, but have access to a robust cloud VM network where all my Unix work is done. The end result of a dev process is an image regardless of what tool you used, right? So how does Docker know if you've used Windows or Unix to write and test a given image? Is there metadata written into the image?

They probably don't know. And it's fine to use docker desktop without paying as long as you're a small business or a private person. They can't automatically know if you're in violation or not.

They just assume people want to be in compliance. Same way I wouldn't misuse gpl code at my work.

Re: Docker for Mac Without Docker Desktop

#79
In my experience, Docker for Mac has always had significant performance problems primarily because of its built in host volume sync strategy. The problem has persisted for many years. Different 3rd party (open source) solutions can relieve this performance bottleneck like docker-sync and mutagen. It just blows my mind that after all these years, the docker for mac team hasn't found a decent file sync strategy to include by default. If you're working on a project with a lot of files, docker for mac's built-in sync strategy is likely crushing your CPU.

Re: Docker for Mac Without Docker Desktop

#80

I find it hilarious that their solution to Docker (which is supposed to be virtualization-light: containers) bloatedness is to use a full-fledged virtual machine. Something's gone deeply wrong somewhere.

I agree, but currently Docker on Mac is more about building/testing your server infra on your macOS dev machine before deploying it to Linux where it actually runs as "lightweight" containers. Regardless, would still be great if we had native macOS container support!

Not if you run your entire dev setup through docker, though. I'm tired of python's craziness. Always someone on the team unable to do poetry install, because some variant of their system makes it not have a wheel, and suddenly a whole c++ toolchain needs to be installed. And if you maintain lots of projects with different versions it's such a hassle.

Now I volume mount the git clone folder into a container that has everything set up. And that setup works for everyone, on all OSes and not depending on local environments.

PyCharm uses that image as a remote interpreter, so pressing play in pycharm just works.

Post reply on HN