Live data from Hacker News

Docker for Mac Without Docker Desktop

github.com

91–100 of 198 posts

Re: Docker for Mac Without Docker Desktop

#91
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. Tech work isn't designed to be compatible with a mac.

I don't think this is true at all. Despite not developing Mac applications, we've (Twilio) been a Mac shop since day one, 14 years ago. This was driven by our three founders, who, at the time, were all engineers. These days our IT department offers Windows machines for employees who need it for some reason, but uptake is likely in the single-digit percentages.

And I know a lot of people who do technical work at various companies whose primary work machine is a MacBook Pro.

This might be a Silicon Valley startup thing. I would expect the Stack Overflow survey is skewed pretty hard toward Windows due to big corporate enterprises that aren't tech companies. It seems to me that most "tech companies" prefer Macs.

> Take for example using netcat. The version available to Mac is 17 years old and lacking some useful flags

I run Linux, so I don't have firsthand experience with much of this, but everyone I know who uses macOS for development has something like Homebrew installed, so they can get up-to-date versions of the various tools that are outdated in the default macOS install.

Re: Docker for Mac Without Docker Desktop

#92
post #44

Earlier quoted context omitted.

I just pulled it (and switched to dockerd as default container runtime to use 'docker') - it seems to work as a great swap for docker desktop on mac. I like that volumes work well vs podman. Nice that you an trivy scan an image, etc. Have you hit any sharp edges yet? I imagine there might be a few. Anything you can share would be great

Port forwarding is currently broken if you use dockerd but it will be fixed in the next release or you can run a command to fix it yourself. See https://github.com/rancher-sandbox/rancher-desktop/issues/12... It fails to setup some filesystem links because of Unix permissions. You can fix it in command line. See https://github.com/rancher-sandbox/rancher-desktop/issues/11... If you put your computer into sleep, the V…

thanks!

Looks like the first and last issue is fixed in 1.0.0 (released 2 days ago). So only that second issue remains for now.

Re: Docker for Mac Without Docker Desktop

#93

Earlier quoted context omitted.

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.

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

Minikube, no sarcasm. I'm also going to use Minikube.

Re: Docker for Mac Without Docker Desktop

#94

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.

Awesome. I'll try it out. Thanks!

Re: Docker for Mac Without Docker Desktop

#96
post #10

One of the past maintainers of minikube here. Minikube, while targeted towards Kubernetes developers, also provides all the features you'd want here. It also takes away most of the pain from virtual machine management w/ native hypervisors. If you're looking for customizability (boot image, docker version, container runtime), minikube is probably your best bet. It even comes with some rudimentary file-sharing and por…

There's one big difference between Docker Desktop and minikube and the ones referenced in the docker desktop alternatives link. Docker Desktop is a desktop app (GUI and all) while all the listed alternatives are terminal apps.

For some this might not matter but for others it does.

Rancher Desktop[1] has the desktop app install experience, the GUI, and the the tools (Docker CLI/nerdctl, Kubernetes (k3s), etc), and more.

[1] https://rancherdesktop.io/

Disclaimer, I started Rancher Desktop.

Re: Docker for Mac Without Docker Desktop

#98
post #18
post #10

One of the past maintainers of minikube here. Minikube, while targeted towards Kubernetes developers, also provides all the features you'd want here. It also takes away most of the pain from virtual machine management w/ native hypervisors. If you're looking for customizability (boot image, docker version, container runtime), minikube is probably your best bet. It even comes with some rudimentary file-sharing and por…

Huh, I thought kind was the spiritual successor to minikube (which I used fondly years ago). When should one reach for minikube over kind today?

From the kind readme[1]...

> kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

minikube was designed for those who want a local kubernetes environment for development. It didn't work well for testing Kubernetes itself which led to kind. They had two different, though slightly overlapping, goals.

[1] https://github.com/kubernetes-sigs/kind

Re: Docker for Mac Without Docker Desktop

#99
post #18
post #10

One of the past maintainers of minikube here. Minikube, while targeted towards Kubernetes developers, also provides all the features you'd want here. It also takes away most of the pain from virtual machine management w/ native hypervisors. If you're looking for customizability (boot image, docker version, container runtime), minikube is probably your best bet. It even comes with some rudimentary file-sharing and por…

Huh, I thought kind was the spiritual successor to minikube (which I used fondly years ago). When should one reach for minikube over kind today?

minikube is good where you have to have a VM, which is development on Windows and OS X. Linux containers need Linux, much to the dismay of laptop buyers I guess.

I personally don't bother. I use Windows but just have a pet Linux VM where I actually do work, and then use kind (with podman; Docker seems to be turning the screws and I'm getting out ahead of that).

Re: Docker for Mac Without Docker Desktop

#100

what about lima? it seems more easier to get. https://github.com/lima-vm/lima

Lima absolutely rocks. For me, there are a few small nits, but overall probably the best to replace Docker. Out of the box ("brew install lima; limactl start") lima gives you an Ubuntu VM with containerd and nerdctl. Nerdctl is mostly compatible with the docker cli as others on this thread have mentioned. The examples/ directory also has configs for starting up k3s or k8s. Rancher Desktop is also using Lima.

Minikube also works, but I can't get host directories mounted in the VM; running nfsd on the Mac is a reasonable work-around. It does start up k8s containers, so if you just want a docker-like environment, it might be overkill.

Post reply on HN