How to Run Linux Docker Containers Natively on Mac with OrbStack?
Tags: macos, linux, container, cloud
Published: 2023-09-24 09:06:19

---
title: How to Run Linux Docker Containers Natively on Mac with OrbStack?
published: true
tags: MacOS,Linux,Container,Cloud
canonical_url: https://firstfinger.in/run-linux-docker-containers-macos-orbstack/
---

> ✅ To stay up-to-date, be sure to subscribe to our [weekly newsletter](https://short.firstfinger.in/newsletter) or join our [WhatsApp Channel](https://short.firstfinger.in/whatsapp-invite). We appreciate your interest 😀!

---

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/Run-Linux-Based-Docker-Containers-on-Mac-1.jpg)

Docker containers are widely used for developing, testing, and deploying applications in Linux environments. However, many developers work on Macs and still need an easy way to run Docker. Fortunately, there are great options available to run Docker containers natively on macOS.

**Docker Desktop is the official app** but uses lots of resources, **Colima is fast and lightweight** yet minimal, and **UTM** utilizes **virtual machines that can be slow**. A new alternative called **OrbStack -** combines the best of Docker Desktop with unparalleled speed, efficiency, and ease of use by taking a lightweight yet full-featured approach optimized for Mac.

> **What makes OrbStack stand out from the rest as a fast, simple, and capable way to run Docker?**

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/4562.png)

## Why Run Docker on a Mac?

### Reasons why developers want to run Docker containers on their Macs

### **1. Development environment consistency**

Eliminates differences between [macOS](https://firstfinger.in/tag/macos/) and [Linux environments](https://firstfinger.in/tag/linux/) when developing applications intended to run on Linux in production. This prevents unexpected issues from creeping in.

### **2. Faster testing**

Spin up disposable environments quickly without waiting for remote deployment. Rapidly iterate through build, test, and deploy cycles.

### **3. Simpler deployment** 

Docker containers used in development can be deployed to production without changes, following the same containerization workflow.

### **4. Replicating production** 

Containers mirror the Linux production environment more accurately compared to alternatives like [VMs](https://firstfinger.in/top-virtual-machine-software/).

### **5. Team workflow** 

Standardizing the [dev environment](https://firstfinger.in/devops-vs-gitops/) with Docker facilitates collaboration. No need to replicate complex tooling on each team member's machine.

### **6. Portability** 

Docker containers can run unchanged on any platform with a Docker engine, providing consistency across [macOS](https://firstfinger.in/maccy-free-clipboard-manager-for-mac/), [Windows](https://firstfinger.in/tag/windows/), and [Linux](https://firstfinger.in/tabby-the-free-ssh-client-for-mac-windows-linux/).

☑️

It's clear that Docker solves many challenges faced by developers working on macOS. Now let's look at the various options available for running containers natively on a Mac 👇🏻.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/1114.png)

## Docker Desktop for Mac

### The officially supported way to run Docker on macOS

[Docker Desktop](https://www.docker.com/products/docker-desktop/) includes the Docker engine, [CLI](https://firstfinger.in/chatgpt-ai-in-linux-terminal/), and Compose making it a one-stop solution for using Docker on a Mac.

### **Key Features:**

- Tight integration with macOS for native [filesystem access](https://firstfinger.in/transfer-files-mac-android-wireless/) and networking.
- Virtualization is made possible by the hypervisor framework, leading to [better performance](https://firstfinger.in/power-efficiency-vs-performance-comparing-apple-silicon-vs-intel-processors/) when compared to older methods.
- Secure access to host ports, user namespaces, and shared filesystems.
- Transparent switching between Linux and macOS containers with Docker contexts.
- Centralized management and security options.
- Built-in Kubernetes cluster.
- Extensions like Docker Scout for container inspection.

👀

Docker Desktop is infamously resource-intensive. It utilizes an entire lightweight VM running Linux in the background, consuming lots of RAM, CPU, disk space, and battery life even when idle. The networking stack is complex, leading to mediocre network performance.

👎

These downsides motivate many developers to look for alternative solutions that are lighter, faster, and simpler.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/220.png)

## Colima

### A Fast and Light Docker Engine

[**Colima**](https://github.com/abiosoft/colima) aims to provide a performant and battery-friendly way to run Docker containers on macOS by using lower-level virtualization [APIs](https://firstfinger.in/tag/apis/) compared to Docker Desktop.

### **Key Features:**

- Very fast startup in under a second.
- Lower resource consumption.
- Supports [Apple silicon and Intel Macs](https://firstfinger.in/power-efficiency-vs-performance-comparing-apple-silicon-vs-intel-processors/).
- Direct access to the host filesystem for volumes.
- Replacement for the Docker CLI and engine.

👀

Colima is not a complete solution. It lacks any GUI, proper DNS integration, IPv6 support, and Linux machine support. The network stack is still limited compared to Docker Desktop. It can also exhibit stability issues and lacks auto-updates.

😶

For developers who just need core container functionality, Colima delivers. But those wanting a seamless Docker experience are better served by a more full-featured Docker environment.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/5254.png)

## UTM

### Containers via QEMU/KVM

[**UTM**](https://mac.getutm.app/) **(User mode emulation of Linux)** utilizes lightweight [VMs powered by QEMU/KVM](https://firstfinger.in/top-virtual-machine-software/) to run Docker containers and more. It supports Linux, Windows, and macOS guests with full virtualization.

### **Key Features:**

- Lightweight QEMU/KVM virtual machines.
- Linux, Windows, and macOS guests.
- Virtual networking and [USB](https://firstfinger.in/transfer-files-mac-android-wireless/) passthrough.
- Shared folders for host/guest integration.
- CLI access and remote management.

⚖️

UTM provides an alternative virtualization environment to run Docker containers in Linux VMs. However, it requires manual configuration and lacks tight integration with the Docker toolchain. Performance is limited by emulation overhead. UTM shines when you need full VMs rather than just containers.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/OrbStack-2-Background-Removed.png)

## Introducing OrbStack

### The Best Docker Experience on Mac

The solutions covered so far highlight the compromises developers make when selecting how to run Docker on macOS. Existing options force a choice between resource usage, speed, compatibility, and ease of use. This is where [**OrbStack**](https://orbstack.dev/) steps in - it raises the bar and delivers the best possible Docker experience on macOS without these tradeoffs.

![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://orbstack.dev/_next/image?url=%2Fimg%2Fhero.png&w=1920&q=75)
_OrbStack - Run VMs, Docker Containers & Kubernetes all in one place_

❇️

OrbStack combines blazing-fast startup, minimal resource consumption, and tight integration with the Docker toolchain and macOS filesystem/networking. The result is an unparalleled Docker environment on macOS with Linux machine support included.

### **Key Features:**

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/OrbStack_Native_app.jpeg)

#### **1. Native macOS app**

Uses AppKit for a responsive UI instead of Electron. Swift code and tight OS integration boost performance.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/benchmarks-perf-edx.png)

#### **2. Lightning fast**

Optimized for speed. Starts in 2 seconds with no VM boot delay.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/benchmarks-power-k8s.png)

#### **3. Light**  & **Power** Efficient

Near-zero idle CPU usage and on-demand memory allocation improve efficiency. Much lower energy usage compared to running a whole VM.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/OrbStack-2-2.jpeg)

#### **4. Simple setup & 2-way file sharing**

Get started immediately with no complex configuration. Linux can access macOS files natively and vice-versa.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/Fwt5ZubaAAEmw4P.jpeg)

#### **5. Network** Integration

Container domains, IPv6, VPNs, and more work seamlessly.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/Fr6a2tWakAIsan_.jpeg)

#### **6. Linux VMs**

Create Debian, Ubuntu, Fedora, and other Linux machine VMs.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/Fyv9ihmaAAAl6y1.jpeg)

#### **7. Docker Extras**

Host networking, bind mounts, domains, and container access.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/F4rliM7awAAchec.jpeg)

#### **8. Kubernetes support**

Run local clusters and access services from macOS.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/F5xJdbGbUAAdZUL.jpeg)

#### **9. Automation-friendly**

Manage OrbStack entirely through the CLI or GUI if desired.

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/4568.png)

## OrbStack Architecture and Performance

### OrbStack is engineered for performance across the board. This starts with its Swift and native macOS codebase that avoids the overhead of solutions based on Electron or heavyweight VMs.

![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://docs.orbstack.dev/img/arch-light.png)
_OrbStack, like WSL 2 (Windows Subsystem for Linux), uses a lightweight Linux virtual machine with a shared kernel to reduce overhead and save resources._

### 1. Swift Application

The application frontend is built entirely in [Swift](https://www.swift.org/), utilizing [AppKit for optimal integration](https://developer.apple.com/swift/) with macOS. This provides a smooth and responsive user interface. Swift's speed and safety prevent performance issues and crashes.

### 2. Minimalist Linux VM

Under the hood, a trimmed-down Linux VM runs only essential components like Docker and [VPN services over a custom network stack](https://firstfinger.in/vpn-vs-zero-trust-network-remote-access/). There is no GUI, window manager, or unneeded applications wasting resources.

This lightweight design allows an incredibly fast launch in under 2 seconds. The VM activates on-demand when needed and remains idle otherwise.

### 3. Optimized Network Stack

Purpose-built networking utilizes the high-performance Netmap framework. This allows minimal latency and fast network speeds exceeding Docker Desktop benchmarks.

The network stack provides full access to Docker containers directly from macOS with IPv6, DNS, and VPN support.

### 4. Dynamic Resource Usage

OrbStack allocates memory dynamically, only using what's needed. This enables running 100s of [containers](https://firstfinger.in/tag/container/) in under 4GB of RAM whereas Docker Desktop would require 8GB or more. OrbStack's CPU usage is at an idle state and near zero.

OrbStack delivers [excellent performance](https://firstfinger.in/mac-studio-m2-ultra-vs-m2-pro-mac-mini-performance/) without resource usage issues by minimizing overhead, unlike Docker Desktop.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/1761.png)

## Ease of Use

### OrbStack is designed to provide a seamless Docker experience on macOS with minimal configuration.

- The **Setup Wizard** guides you through installation and configuration in just a few clicks. Get up and running immediately without a complex setup.
- **Automatic domain names** remove the need to think about ports when accessing services. Just use the container name: `webapp.orb.local`.
- [**SSH**](https://firstfinger.in/tabby-the-free-ssh-client-for-mac-windows-linux/) **keys** and **environment variables** are automatically forwarded to containers.
- **File access** works seamlessly in both directions between macOS and Linux.
- **2-way file sharing** allows copying files between macOS and Linux visually or via the command line.
- **CLI access** is available through the standard Docker and docker-compose CLIs as you'd expect.

OrbStack makes working with Docker on macOS simple and intuitive. Next, let's look at some of its power user features.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/5716-1.png)

## Advanced Features

### While designed for simplicity and ease of use, OrbStack includes several advanced configuration options and features.

### 1. Linux Virtual Machines

In addition to [Docker](https://firstfinger.in/kubernetes-vs-docker-vs-jenkins/), OrbStack can run full Linux distributions like [Ubuntu](https://firstfinger.in/how-to-install-nextcloud-azure-ubuntu-ec2/), Fedora, and more in lightweight VMs. This flexibility helps OrbStack replace tools like Parallels or VirtualBox.

Linux VMs include:

- **Automatic networking** - [Access Linux services directly from macOS.](https://firstfinger.in/how-to-connect-to-aws-ec2-instance-using-ssh/)
- **SSH access** - Easily connect to Linux VMs.
- **Shared folders** - Linux can access macOS files.
- **Fast x86 emulation** - Near-native performance when emulating Intel computers.
- **CLI control** - Easily create and manage VMs from the command line.

### 2. Kubernetes Support

OrbStack makes it easy to [run local Kubernetes clusters](https://firstfinger.in/kubernetes-vs-docker-swarm/).

Features include:

- **Simplified networking** - Expose services directly via macOS DNS and IPs. No need for port forwarding.
- **Automatic domain names** like `myapp.local` for services.
- **Full access to pods and services** from the macOS host.
- **Single node cluster** - Perfect for development and testing.
- **ORB add-on** - Managed configuration and installation of Kubernetes with a click.

### 3. Network Integration

As highlighted earlier, OrbStack's networking stack delivers seamless integration between macOS, Docker containers, and Linux VMs.

- **VPN support** - Containers work properly over VPNs.
- **IPv6 networking** - End-to-end IPv6 support.
- **Fast performance** - Optimized network engine built on Netmap.
- **macOS proxying** - Forwarding for [HTTP, HTTPS](https://firstfinger.in/http-2-vs-http-1-1/), DNS, and more.
- **Seamless experience** - Containers and Linux VMs feel like part of the native macOS environment.

* * *

 ![How to Run Linux Docker Containers Natively on Mac with OrbStack?](https://firstfinger.in/content/images/2023/09/220-1.png)

## Should You Use OrbStack?

> Introducing OrbStack 1.0: the fast, light, easy way to run Docker containers & Linux[https://t.co/wGGy4J16h0](https://t.co/wGGy4J16h0) [pic.twitter.com/BVdABDyf01](https://t.co/BVdABDyf01)
> 
> — OrbStack (@OrbStack) [September 21, 2023](https://twitter.com/OrbStack/status/1704883390569443558?ref_src=twsrc%5Etfw)

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Yes, OrbStack is an excellent choice for anyone who wants the best possible Docker experience on their Mac. Its winning combination of performance, efficiency, and usability makes OrbStack a perfect replacement for Docker Desktop and Colima.

Developers fed up with Docker Desktop's resource usage and sluggishness should give OrbStack a try - they'll be amazed by the difference. If you just need core Docker functionality, OrbStack won't let you down. It's advanced networking, Linux VMs, and Kubernetes support provide plenty of room to grow.

So if you're looking to level up your Docker workflow on macOS, look no further than OrbStack!

## FAQs (Frequently Asked Questions)

#### How is OrbStack different from Docker Desktop?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

OrbStack is an alternative to Docker Desktop engineered specifically for macOS. It delivers a faster, lighter, and simpler Docker experience thanks to its native Swift codebase, minimalist VM design, and optimized network stack.

#### What are the system requirements to run OrbStack?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

OrbStack requires macOS 12.3 or newer on both Apple Silicon and Intel Macs. At least 4GB of RAM is recommended. See System Requirements for details.

#### How do I switch from Docker Desktop to OrbStack?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

First, install OrbStack, then stop Docker Desktop. OrbStack will handle switching the Docker CLI to connect to it automatically. Transferring images and volumes is seamless.

#### Can I run graphical Linux apps with OrbStack?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

Not directly, but you can set up XQuartz as an X11 server to display graphical apps from Linux VMs. VNC is another option for remote access.

#### Does OrbStack allow USB passthrough to VMs?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

Not currently, but USB device passthrough is on the roadmap. For now, linking Mac USB tools to the Linux CLI can work as an alternative.

#### How does OrbStack differ from Colima?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

Colima delivers only core Docker functionality. OrbStack adds a full UI, better networking, Linux VMs, Kubernetes, and tight macOS integration that Colima lacks.

#### Can I use Kubernetes with OrbStack?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

Yes! OrbStack makes running local Kubernetes clusters simple. Services integrate natively with macOS networking for maximum transparency.

#### Is there a cost for OrbStack?
<button>
                    <svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
                        <path d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"></path>
                    </svg>
                </button>

OrbStack is free for personal use but paid licenses are required for commercial usage. See pricing for details.