LimaVM Is Probably The Best MacOS Virtual Machine I've Ever Used
If you're tired of Docker Desktop bogging down your machine, or simply don't like fuff of mapping ports, mounting volumes when all you need is a small virtual environment, this one's for you.
I recently discovered LimaVM, and it's a game-changer for local development.
It lets you spin up Linux VMs with ease, offering a faster, lighter alternative to Docker and other VM managers for many tasks, but especially for development.
What's the big problem?
Let's face it: containers can be a resource hog, even when they're not, the hypervisor can start eating resources like it's a memory cookie monster.
Remember that feeling when you're trying to quickly test an application, but you mess up the port mapping, then mount the wrong path and env vars, then it takes forever to start, eats up your CPU, and drains your battery?
I've been there, struggling with permissions, and a sluggish shared file system.
It's a frustrating experience that eats into valuable development time, and this builds over over time.
How do most people solve it?
Many developers default to Docker, or even expensive cloud-based VMs, to create the Linux environments they need for building, testing, and running software.
While these solutions work, they often come with significant overhead, not to mention the cost of holding unnecessary resources in the cloud.
Docker Desktop or its alternatives, while convenient, can be too heavy for simple development tasks, especially on older or less powerful machines.
Cloud VMs add complexity and cost, not to mention the risk of not wiring things up correctly, leaving your previous code and secrets exposed (which in turns require another setup of proper tunneling, permissions management, and... you get the point).
Local development can be done right, but it doesn't have to be a pain
Enter LimaVM.
It provides a best-of-all-worlds way to run Linux VMs on MacOS (but not only macs), with minimal overhead.
It handles networking, file sharing, and port mapping automatically, so you can access your web app, and local files to work on without even mentioning it:
Lima assumes you need them by default.
It's fully compatible with container runtimes like containerd (which it was initially built to promote!). It's designed for developers, offering a simple CLI that gets out of your way.
Putting LimaVM into Action
Getting started with LimaVM is straightforward. If you are on MacOS, you can install Lima with brew:
Then, simply run:
Lima will set up a default Ubuntu VM geared for Docker. You can then access it using:
This will drop you into a shell within the VM, with your local file system mounted and ready to go.
From there, you can install dependencies, run your code, and test your applications.
You can even run containers using Nerdctl (if you're crazy enough to do so 😅)
Why This Matters
LimaVM offers a compelling alternative to Docker, or any other form of virtualization for local development. It's faster, lighter, and easier to use.
Whether you're building containerized applications or just need a Linux environment for testing, LimaVM can significantly improve your workflow.
"Lima has a developer first mindset it doesn't force you into guies or complex configs there's a simple CLI that gets out of your way when all you need is work"
Exploring Further
LimaVM is highly customizable.
You can explore different templates for various Linux distributions and container engines.
Check out the official documentation at https://limavm.io for more information.
Thank you for reading.
Feel free to reply directly with any question or feedback.
Have a great weekend!
Whenever you’re ready, here’s how I can help you:
|
|