LimaVM Is Probably The Best MacOS Virtual Machine I've Ever Used


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:

brew install lima

Then, simply run:

lima start

Lima will set up a default Ubuntu VM geared for Docker. You can then access it using:

lima shell

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!

ESPRESSO FRIDAYS

Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!

Read more from ESPRESSO FRIDAYS

Coding Is Changing. Here's How I Stay AHEAD This issue is brought to you by: Ideas to apps in seconds with Lovable Lovable is your superhuman full stack engineer. Click here for double credits when signing up The AI revolution isn't replacing engineers (IMHO) - it's changing how they work and which skills matter most. I mean, look at the sponsor of this week, a "vibe coding" platform that creates your idea in no time. But, does it actually matter for developers / devops and other tech...

Edit Faster: Vim Motions From Scratch Ever watched a developer frantically switching between keyboard and mouse? "Click, type, click, type..." It's like watching someone crawl when they could just walk. If you're tired of granny mode coding and want to boost your productivity, Vim motions might be exactly what you need. Every once in a while, I review my processes, trying to improve systems, tools, and yes, motions. This time I thought, why not share the basics with everyone too? These...

Neovim Debugging: A Dev's Edge in the AI Age In a world where AI-generated code is slowly becoming the norm, mastering debugging isn't just a nice-to-have skill—it's survival. As John Carmack, the legendary game engine developer, wisely pointed out: "A debugger is how you get a view into a system that's too complicated to understand. I mean, anybody that thinks 'just read the code and think about it'—that's an insane statement."- Lex Fridman Podcast What's the problem? Most developers...