Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Colima: Container runtimes on macOS (and Linux) with minimal setup (github.com/abiosoft)
132 points by luu on May 18, 2023 | hide | past | favorite | 55 comments


Colima has been an awesome replacement of Docker Desktop for me on Mac. It seems to run light, doesn't prompt for updates on system launch, in fact doesn't even auto launch on startup, have to manually do colima start. And docker just works flawlessly. Kudos to the team who built this. Best part is this nifty little command that allows for auto complete script generation for the required shell, try it:

colima completion zsh

Using 14" M1 Pro Mac, experience may vary on different hardware I suppose.


Tangentially related but I wish people would stop recommending nix-env and just in general ad-hoc installation on using Nix. It defeats the purpose of using Nix in the first place. If you want to try a package out, there’s "nix shell" or "nix-shell -p" if you’re not using flakes. If you want to install a package you should put it in your configuration instead.


You mean pretty much the very first thing that the Nix Manual suggest in the Quick Start:

https://nixos.org/manual/nix/stable/quick-start.html

and then later again in the Basic Package Management section:

https://nixos.org/manual/nix/stable/package-management/basic...

I fully agree that it is using Nix in the wrong way. But if it's something that Nix's own manual suggest, you can't blame people for doing the same.


I have all of my config in a flake, but I think both are fine. Not everyone will use Nix the same way. And it’s easy to see a progression path from using Nix with package installation from nix-env, to flakes, to NixOS. Some people might stop along that journey, but Nix might not have been a good fit for their usecase then anyways. It’s already way too hard to break into the ecosystem, no reason to make it harder.


Personally I'll be sticking to Rancher Desktop[1]

It's backed by SuSE so it's going to be supported and not dependent on a single maintainer.

From my perspective, the last thing I want to do is waste my time debugging my container runtime, I just want to get on with the job.

It's based also around K3s, which is well suited to desktop environments. The list goes on...

[1]https://rancherdesktop.io


Rancher desktop has a bloated electron GUI and and just keep in mind that Rancher as a company is going the way of dust - already about as relevant as SuSE.


You hate to see it but this is brutal, correct, and brutally correct.


What do you see as a replacement for Rancher? I haven’t seen any offerings that out of the box work behind a firewall. Tanzu Mission Control failed this, D2iQ Kommander fails at it as of 2.0. EKS Anywhere doesn’t have that either afaik.


Rancher is going the way of dust? Most dev organizations I'm familiar with either use terraform + EKS + helm + pipeline, or replace a lot of that complexity with Fleet.


Meaning it's basically already dead.


Rancher Desktop also runs on Windows, whereas Colima doesn't.


Does it work with Podman?

Does it have support for docker-compose files?


No and yes (via docker-cli, the open source part)

https://github.com/abiosoft/colima/issues/627


Whenever I need a VM on my MacOS I reach out to Multipass[1].

It is a project by Canonical and has a decent amount of features to get the job done. However, it only supports Ubuntu VMs and has some rough edges.

[1] https://multipass.run/


Multipass is my go to for canonical ( no pun intended) environments across different machines. For example to create identical development VMs for all team members.

The limitations are part of why it works well. Very little to configure and the base image is fairly lean.


I have had better luck with orbstack (https://orbstack.dev)


It's a bit disappointing that OrbStack is not open source, but it works really well.

In my experience (co)lima was already an improvement over Docker Desktop in terms of reliability and background resource usage, but OrbStack is even more lightweight. I also do a bit of low-level networking development and Docker Desktop was rewriting some fields of the IP packets (besides NAT translation) which was annoying. It works seamlessly here.

It still has the same VM memory usage issue as other tools (Linux page cache taking more and more memory over time and not releasing it to the host), but they claim it will work correctly once a bug in Virtualization.framework is fixed: https://twitter.com/OrbStack/status/1645782250116505600


Great to hear, thanks for sharing :)

Here's to hoping that Apple fixes the underlying memory bug in macOS 14. Being able to ship dynamic memory would be amazing!


Colima/Lima already support more features than OrbStack, and are FOSS, and OrbStack will soon become a paid product (like Docker Desktop), so I would recommend either Colima or Docker Desktop instead.


Podman is an open source option on all platforms too. On Mac and Windows it runs a VM with Linux just like Docker Desktop, colima, etc.

https://podman.io/docs/installation


And Podman Desktop now ships with kind for K8s!


(I work on OrbStack.) Fair point. Any missing features that you've noticed in particular?

Edit: OrbStack will also most likely remain free for personal non-commercial use.


Please have a personal license that allows commercial use by the licensee, often it's hard to convince your company to get something just for you and I'm happy to pay for a tool I already use so I don't have to context switch. (I did so for Obsidian and Berkeley Mono).


To add to this I have purchased my own Jetbrains All Products subscription for many years now for exactly this reason. I bring my tools with me, I want to use them on commercial products I develop for companies I work for and I don't want the hassle of them trying to license software for me.

This is the status quo for Java tools at the very least, i.e IDEA, YourKit, etc.


Yes, you'll be able to purchase the commercial+business use license yourself. It won't be limited to companies.

Subject to change before launch, but initial plans are $8/user/mo: https://twitter.com/OrbStack/status/1656326409995055104


$100 a year seems pretty steep for a tool like this; to compare, that is also the price for Parallels Desktop.


Docker Desktop: $84-132/yr

Parallels Desktop Pro (no resource limitations): $120/yr

OrbStack: $96/yr

Seems very reasonable, especially for a tool that does most of what Docker Desktop and Parallels do combined (but better in most cases), and it'll only improve over time.


Except Parallels also gives you an entire desktop experience, including the maybe best Windows on ARM experience in existence (thanks to Qualcomm). That is a lot of utility. OrbStack just feels like an upgrade to (co)lima on the other hand that I'd get for the added comfort, nice GUI and marginal performance uplift (though props for having cgroupv2 dockerd). But not because it actually provides capabilities that I can't get elsewhere, from sources where I don't have to consider licensing and building my scripts on top of something someone might not be able to use.

And I'm not sure the comparison with Docker Desktop is warranted. They're basically doing continuity extortion.


I work on OrbStack. Thanks for the mention — happy to answer questions!


When K8s?


Pretty perspective, but still so far to institute Docker.


(I work on OrbStack.) Care to elaborate a bit on why?



This happens with Multipass too.


How does this compare to Podman or using Docker directly? Can this be used to create something like Distrobox for macOS?


Speaking to Mac usage specifically here.

I’ve used all three and went with Colima + Goland/Pycharm’s docker integration for the UI. Easy to install, integrations tend to just work without fiddling.

Podman is honestly overrated. Getting it integrated with other tooling is a pain and no it’s not as simple as renaming podman to docker. K8S side works pretty ok. I didn’t like podman desktop.

Docker Engine requires docker desktop on Mac so if you’re using one you’re using the other.


I’ve had a weird bug with podman machine that moved me towards Colima: the vm will just randomly freeze and not come back to life until you restart it. Also podman machine doesn’t use the virtualization framework on MacOS, preventing the usage of virtiofs, which means volume mounts are super slow.


We migrated all our devs to colima and it's been pretty good. Don't want to deal with Docker (the company) and don't use any of the "features" of Docker Desktop.

The only actual issue we've seen is the way folder syncing works includes a slight delay, which has caused some unit tests that depend on running commands in a container with the current working directory mapped that create files to fail intermittently. We believe this is because of sshfs caching. We've updated the tests to wait for the files to appear rather than assume.


But you still run the Docker daemon, no?

Is the colima cli really so much better you’d not just stick to docker-compose, docker buildx, etc?

I’d switch from Docker, but if I’m running it under the hood anyways, I don’t see much point in replacing the fronted — but please convince me otherwise!


You have it exactly backwards. We use colima to run the (lima) VM that runs Docker daemon, but we use all the standard docker tools on the host. Colima configures docker with a context called "colima" that knows how to talk to the guest correctly.


I just got Colima running on my 2020 x86 MacBook the other day. I ended up having to specify an extra `--cpu-arch` flag to get it running, but it definitely seems quicker and lighter than docker desktop. E.g. my machine used to choke when zooming while running docker and pycharm, but now runs fine.


We migrated our devs to Linux. Do Docker? Do Linux.


Our production environment is Docker on Linux, but the company policy is Windows on working computers. After objecting to this, being permissioned to run pure Linux, and greatly simplifying and speeding up the build process, the other devs are switching to Linux, too.


Ah, I have a story about the opposite of this.

One company I worked for was merged with a bigger one, which ended up dictating the IT policy and they didn't liked supporting Linux. Unfortunately, our best devs were on Ubuntu. This was followed by six months of pure agony. Previously simple tasks were now complicated or impossible. Productivity went down, and at least one project was killed.


Same.

Works so much better in its native environment. Everything is faster and more stable.


You can also try finch from AWS which combines a similar stack

https://github.com/runfinch/finch

Disclaimer I work at AWS and helped with testing finch during development


I tried podman and colima and neither worked with a moderately complex docker compose file at all. Lost a day digging through errors and went back to Docker Desktop.


I really like .devContainers in VSCode, but I really don't like Docker. I use Podman on Fedora which switched to cgroups v2 a long time ago, and while it works ok almost some of the time, it's inconsistent when sharing my devcontainer setup with my macOS colleagues.

What are people's experiences running devcontainers with Colima? The repo suggests that it _should_ work, but I'd be curious to hear subjective experiences.


I fe l this pain too. In the end I ditched macos for popos just to get native performance with devcontainers.


Can you do cross-platform builds on it with buildx on M1 yet? What's the story around shared volumes? How about local registry running? Will it work with DB test containers in Java? How about Java clients that use the docker socket, like maven's docker plugin?


This too seems to be based on Linux VMs. Does macOS contain primitives that would enable native containers?


Unfortunately not, but modern virtualization doesn't have to be slow or heavy!


Does this support GPU?

It would be great to be able to run deep learning workloads via docker on macos.


How does this compare to Lando?


Or Multipass?

I'm new to the whole container world, so at this juncture, I can't really tell them apart.

Multipass seemed to do "container" things quite quickly.




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

Search: