Hacker News new | past | comments | ask | show | jobs | submit login

Also worth checking out is Colima, which uses Lima to give you a linux container environment without needing to install Docker Desktop:

https://github.com/abiosoft/colima




colima pretty much solves dev experience for docker and k8s on mac, esp. for apple silicons (m1/m2), where you can build multi-arch containers with ease.

Some interesting caveats:

* By default, system packages don't persist, as the default alpine distribution runs on tmpfs and doesn't have a overlay. This is a reasonable default, as it keeps the default VM storage small.

* If you want to have additional system packages, you can turn on a ubuntu overlay that supports additional systemd services just fine. Of course, storage would balloon to a few GBs from a few hundred MBs.

Edit: typos.

BTW, the result of docker build is immediately available to the k8s (k3s) cluster without any insecure registry and/or side loading/caching steps, thanks to the seamless buildkit integration.


One more caveat: mounts don't work: https://github.com/abiosoft/colima/issues/503

One of our tools runs in Docker just to ensure that it gets the right version of its dependencies, and that bug is a pretty huge bug for us, for that tool, as it basically broke things.

Still, we use colima; it is a decent workaround for the "Docker on macOS" problem otherwise.


For my configurations, enabling mounts with '--mount' is more verbose but works fine. https://docs.docker.com/storage/bind-mounts/


Are those flags not essentially synonymous (with perhaps slightly different syntax for their argument)?

… I had noticed that `--mount` in other contexts appears to work, but I have not had the time to investigate why or how that is.

(We've also had bugs with Docker proper in the past where they broke --mount but only for certain paths on the host.)


In my mental map, yes, but in practice, they act a little differently than my intuition. Even on past non-colima docker usage, I came across surprises w/ `-v` vs `--mount` and so generally try both if I'm having problems.


Borrowing this thread to add additional context, Rancher Desktop on macOS also uses Lima to make VMs for running k8s (I think it's actually k3s?) on your workstation. I've been meaning to try out Colima, since, while nerdctl is pretty functional and things work, sometimes dealing with the nuances when I don't really need a real Kubernetes environment for most of my dev tasks is more overhead than I'd like. That said, if you do need a proper k8s environment on macOS, Rancher Desktop does work quite well, and makes a lot of sense especially if your shared k8s environments are managed by Rancher.


There is also Finch (from AWS): https://github.com/runfinch/finch

> Finch provides a simple client which is integrated with nerdctl. For the core build/run/push/pull commands, Finch depends upon nerdctl to handle the heavy lifting. It works with containerd for container management, and with BuildKit to handle Open Container Initiative (OCI) image builds. These components are all pulled together and run within a virtual machine managed by Lima.


Can't agree more. I've been using Docker for Mac and Colima alternately past few weeks on the same machine and the same projects. The amount of times I needed to curse at Colima was zero, while Docker for Mac sadly is still a poor experience. Every now and then things just "don't work" and you need to reset or even reboot.


Colima is great, compared to Podman it's a lot more of a drop-in replacement for my use case. I've always had issues with Podman volumes but with Colima it was as simple as uninstalling Docker Desktop and running "colima start".

There's one issue I'm running into where it becomes unresponsive after a while and "docker ps" hangs forever though.


Colima has been my daily driver for local dev since docker desktop became unusable. Highly recommend


Also mentioned in the original post.


I am also a Colima convert and beat myself up for not using it sooner.

Docker Desktop is a bad joke.

Recommended.


So this Lima is some sort of frontend for Docker then? That would be important to mention.


lima (linux on macos) is a VM management tool CLI frontend which can use QEMU or Virtualization.framework as a backend, colima (containers on linux on macos) is leveraging lima to set up a linux vm to handle linux containers straight from macos (including host-vm shares, port forwardong to the vm, etc...)

If you want to draw some very coarse comparisons with big names, lima is like VMware Fusion, colima is like the Docker for Mac app.

colima kind of fills one of the use cases of docker-machine which kind of died as this use case was handled by DfM and the other use case (handling machines for swarm) was folded into docker swarm and docker compose.


No, Lima just sets up a VM for you. Colima is a wrapper around Lima that can configure a Docker daemon and context for you. You still need the Docker CLI to use Docker.


That's what I thought at first but the comments here confused me by mixing in Docker everywhere.


Generally when using docker on a Mac you are actually running linux containers, so you need a linux virtual machine.

Colima is a low-configuration command line tool to spin up a linux VM (using Lima) which includes docker support, so you can run docker commands in the Mac terminal but the containers actually run in the linux VM.

You still have to install the actual docker CLI tool separately via Homebrew etc. Colima just provides everything else.

This is also what happens generally when you install and run Docker Desktop on Mac or Windows, I just like Colima because it’s a much lighter installation and doesn’t come with the commercial paid license requirement of Docker Desktop.


My understanding is that Colima is based on such a front-end, but Lima is not.


love it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: