Skip to content

🚒 Docker on macOS Without Docker Desktop: The Revenge Edition πŸ΄β€β˜ οΈ ​

🍏 Why Do We Even Need Docker Desktop on macOS? πŸ€” ​

Ah, macOS! The sleek, shiny paradise of developers... until you realize it doesn’t support Docker natively. Why? Because Docker needs Linux Kernel features (like namespaces, cgroups, and other geeky magic), but macOS runs on Darwin, which is like Linux’s distant cousin who never went to engineering school. πŸ™ƒ

Docker Desktop acts as a translator πŸ—£οΈ between Docker and macOS by running a hidden Linux VM behind the scenes. It makes everything seamless, but at the cost of high CPU usage, RAM-eating habits, and licensing drama. πŸ’°πŸ”₯

So, what if you don’t want Docker Desktop? What if you want to live dangerously, like a true terminal warrior? πŸ΄β€β˜ οΈ

Well, grab your command-line sword βš”οΈ because we’re about to set sail! 🚒

πŸ—οΈ The DIY Docker Setup: macOS Style 🍏 ​

Here’s how you can run Docker without Docker Desktop using Colima 🐧 and Lima (because Lima sounds cooler than β€œLinux VM” 😎).

πŸ“¦ Step 1: Install Homebrew (If You Haven't Already) ​

Homebrew is the unofficial package manager that makes macOS developers feel like they’re using Linux. Install it if you haven’t:

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

🐳 Step 2: Install Docker CLI (If You Haven't Already, Because We Still Need It) ​

We’re removing Docker Desktop, not Docker itself! I’m just suggesting you install thisβ€”doesn’t mean you have to. I mean, come on, you’re a pro dev, right? You probably installed it before even reading this. If that’s the case, feel free to skip this part and flex on the newbies. πŸ’ͺ😎 Otherwise, here’s how you do it::

bash
brew install docker

πŸ—οΈ Step 3: Install Colima (Your Tiny Linux VM) ​

Colima is like Docker Desktop but without the bloat and drama. Install it using:

bash
brew install colima

πŸ”₯ Step 4: Start Colima and Let the Magic Begin ​

Now, let’s fire up the Linux VM that will run your containers:

bash
colima start

Boom! πŸ’₯ Your macOS is now pretending to be a Linux machine. 🎭

βœ… Step 5: Check If Docker Works ​

Run:

bash
docker run hello-world

If Docker greets you with a friendly "Hello from Docker!", congrats! You just ditched Docker Desktop like a pro. πŸŽ‰

πŸ”Œ How Docker CLI Talks to Colima πŸ—£οΈ ​

When you run a docker command, the CLI normally talks to Docker Desktop’s VM. But since we banished Docker Desktop to the shadow realm, the CLI now talks to Colima’s lightweight VM, which provides all the Linux Kernel goodies Docker needs.

It’s like replacing a corporate CEO with a chill startup founder who still gets things done. 😎

πŸ€·β€β™‚οΈ But What About Kubernetes? (For the Fancy People) ​

If you need Kubernetes (K8s), install it separately:

bash
brew install kubectl
colima start --with-kubernetes

Boom! Now you have K8s running without Docker Desktop! πŸ†

🏁 Wrapping Up ​

🎯 Why This is Awesome: ​

βœ… No high CPU usage πŸš€ βœ… No annoying licensing restrictions πŸ›‘πŸ’° βœ… Fully open-source and lightweight 🐧 βœ… You now have Docker without Docker Desktop! πŸŽ‰

🎯 Things to Keep in Mind: ​

⚠️ No GUI – This is all terminal-based. If you miss the Docker Desktop UI, well… welcome to the real dev life. 😎 ⚠️ Some edge cases might be tricky – But hey, that’s what Stack Overflow is for. πŸ€·β€β™‚οΈ

And that’s it! You’ve successfully rebelled against Docker Desktop. Now go forth and containerize everything, you rogue developer! πŸ΄β€β˜ οΈπŸ³


Happy hacking! πŸš€

Built by noobs, for noobs, with love πŸ’»β€οΈ