I want an Ubuntu 24.04 environment for troubleshooting and testing without maintaining a full desktop VM. Is a container a good fit, and what would I need to set one up?
What's a lightweight way to run Ubuntu 24.04 on a Mac?
Answers
For a shell and ordinary command-line tools, Docker is a straightforward option. Install Docker Desktop or Colima, start its container runtime, then run an Ubuntu 24.04 image. Mount a host directory if you want files to survive when you remove the container.
Containers on macOS still need a Linux VM underneath because they use a Linux kernel. You avoid managing a separate full desktop VM, but it isn't Linux running directly on the Mac kernel.
Reply to this answer
If you want a desktop, Sparrow is an Ubuntu 24.04 container setup with XFCE over RDP, SSH access, and persistent home storage. It uses Docker Compose with Docker Desktop or Colima. It's a first public release, so I'd treat it as something to test rather than assume it's polished.
Reply to this answer
Consider Lima if you actually want a small Linux VM rather than a container. You can run Docker inside it too. Colima already uses Lima underneath, so going directly to Lima is more about choosing how you manage the VM than avoiding one.
Reply to this answer
Multipass is another option for a quick Ubuntu VM. It's free and works on macOS, Windows, and Linux. It's not a container, but that may be a better fit if your testing needs a more conventional Ubuntu system.
Reply to this answer
On Apple silicon, Apple's container tools are another option worth looking at if you want something other than Docker. Check their requirements and whether the setup supports the workflow you need before committing to it.
Reply to this answer
Add your answer
Answers are reviewed before publication.
-beyond-the-velodrome:
That makes sense. I mostly need a shell, but having a desktop available would be useful too.