<?xml version="1.0" encoding="utf-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><script src="https://www.rss.style/js/atom-style.js" xmlns="http://www.w3.org/1999/xhtml"/><title>Tower of Kubes</title><link rel="self" type="application/atom+xml" hreflang="en" href="https://www.towerofkubes.com/tags/container/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://www.towerofkubes.com/tags/container/"/><link rel="alternate" type="application/rss+xml" hreflang="en" href="https://www.towerofkubes.com/tags/container/index.xml"/><id>/</id><updated>2025-10-16T00:00:00Z</updated><author><name>Ro'i Bandel</name></author><generator>Hugo 0.157.0</generator><entry><title>Lima and Colima</title><link rel="alternate" type="text/html" hreflang="en" href="https://www.towerofkubes.com/articles/lima-and-colima/"/><id>https://www.towerofkubes.com/articles/lima-and-colima/</id><updated>2025-10-16T00:00:00Z</updated><summary type="html">Overview of Lima and Colima on macOS, how they differ, install commands, Docker usage examples, and Apple’s native Container runtime.</summary><content type="html"><![CDATA[<p>Today I learned about <a href="https://lima-vm.io/"  target="_blank" rel="noreferrer">Lima</a> and <a href="https://github.com/abiosoft/colima"  target="_blank" rel="noreferrer">Colima</a>, which help run Linux VMs and containers on macOS.</p>
<p>I learned about these tools while writing <a href="/articles/how-to-install-docker/" >How To Install Docker</a>. Although I’ve heard about them in the past, I kept forgetting what they were called, which is one reason I am writing about them now.</p>

<h2 class="relative group">Lima
    <div id="lima" class="anchor"></div>
    
</h2>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>Lima launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2).</span>
      </div>
    </div><ul>
<li><a href="https://lima-vm.io/docs/"  target="_blank" rel="noreferrer">Lima: Linux Machines | Lima</a></li>
</ul>
<p>As this description states, Lima is similar to WSL. When using Windows, I have gotten used to a workflow based around WSL, both <a href="/articles/how-to-install-docker/" >for Docker</a> and <a href="/articles/git-setup-for-windows-and-wsl/" >with Git</a>. I have not used macOS yet but expect to one day get a MacBook as a work laptop, and will have to learn an effective workflow for macOS.</p>

<h2 class="relative group">Colima
    <div id="colima" class="anchor"></div>
    
</h2>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>Colima - container runtimes on macOS (and Linux) with minimal setup.</span>
      </div>
    </div><ul>
<li><a href="https://github.com/abiosoft/colima"  target="_blank" rel="noreferrer">GitHub - abiosoft/colima: Container runtimes on macOS (and Linux) with minimal setup</a></li>
</ul>

<h2 class="relative group">Differences between Lima and Colima
    <div id="differences-between-lima-and-colima" class="anchor"></div>
    
</h2>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>How does Colima compare to Lima?</span>
      </div>
      <div class="admonition-content">
        <p>Colima is basically a higher level usage of Lima and utilises Lima to provide Docker, Containerd and/or Kubernetes.</p>
      </div>
    </div><ul>
<li><a href="https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#how-does-colima-compare-to-lima"  target="_blank" rel="noreferrer">colima/docs/FAQ.md at main · abiosoft/colima · GitHub</a></li>
</ul>
<hr>

    <div class="admonition quote">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z"/></svg>
        <span>“How does Lima relate to Colima?”</span>
      </div>
      <div class="admonition-content">
        <p><a href="https://github.com/abiosoft/colima"  target="_blank" rel="noreferrer">Colima</a> is a third-party project that wraps Lima to provide an alternative user experience for launching containers.</p>
<p>The key difference is that Colima launches Docker by default, while Lima launches containerd by default.</p>
      </div>
    </div><ul>
<li><a href="https://lima-vm.io/docs/faq/colima/"  target="_blank" rel="noreferrer">Colima (third-party project) | Lima</a></li>
</ul>
<p>It’s worth noting that current versions of Lima also support <a href="https://lima-vm.io/docs/examples/containers/docker/"  target="_blank" rel="noreferrer">using Docker as a container runtime</a>, and the same is true the other way: Colima supports <a href="https://github.com/abiosoft/colima?tab=readme-ov-file#containerd"  target="_blank" rel="noreferrer">using containerd as a container runtime</a>.</p>

<h2 class="relative group">Installation
    <div id="installation" class="anchor"></div>
    
</h2>

<h3 class="relative group">Install Lima
    <div id="install-lima" class="anchor"></div>
    
</h3>
<ul>
<li><a href="https://lima-vm.io/docs/installation/"  target="_blank" rel="noreferrer">Installation | Lima</a></li>
</ul>

    <div class="admonition example">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 384l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-288 56 0 64 0 16 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-64 192 0 0 192-192 0 0-32-64 0 0 48c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48L368 0c-26.5 0-48 21.5-48 48l0 80-76.9 0-65.9 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 480c0 17.7 14.3 32 32 32s32-14.3 32-32z"/></svg>
        <span>Example</span>
      </div>
      <div class="admonition-content">
        <div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># Homebrew</span>
</span></span><span class="line"><span class="cl">brew install lima</span></span></code></pre></div></div>
<hr>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># MacPorts</span>
</span></span><span class="line"><span class="cl">sudo port install lima</span></span></code></pre></div></div>
<hr>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># Nix</span>
</span></span><span class="line"><span class="cl">nix-env -i lima</span></span></code></pre></div></div>
      </div>
    </div>
<h3 class="relative group">Install Colima
    <div id="install-colima" class="anchor"></div>
    
</h3>
<p>Colima is available on Homebrew, MacPorts, and Nix. <a href="https://github.com/abiosoft/colima/blob/main/docs/INSTALL.md"  target="_blank" rel="noreferrer">Check here for other installation options</a>.</p>

    <div class="admonition example">
      <div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M192 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm-8 384l0-128 16 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-288 56 0 64 0 16 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-64 192 0 0 192-192 0 0-32-64 0 0 48c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48L368 0c-26.5 0-48 21.5-48 48l0 80-76.9 0-65.9 0c-33.7 0-64.9 17.7-82.3 46.6l-58.3 97c-9.1 15.1-4.2 34.8 10.9 43.9s34.8 4.2 43.9-10.9L120 256.9 120 480c0 17.7 14.3 32 32 32s32-14.3 32-32z"/></svg>
        <span>Example</span>
      </div>
      <div class="admonition-content">
        <div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># Homebrew</span>
</span></span><span class="line"><span class="cl">brew install colima</span></span></code></pre></div></div>
<hr>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># MacPorts</span>
</span></span><span class="line"><span class="cl">sudo port install colima</span></span></code></pre></div></div>
<hr>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># Nix</span>
</span></span><span class="line"><span class="cl">nix-env -iA nixpkgs.colima</span></span></code></pre></div></div>
      </div>
    </div>
<h2 class="relative group">Using Docker with Lima and Colima
    <div id="using-docker-with-lima-and-colima" class="anchor"></div>
    
</h2>

<h3 class="relative group">Docker with Lima
    <div id="docker-with-lima" class="anchor"></div>
    
</h3>
<p><a href="https://lima-vm.io/docs/examples/containers/docker/"  target="_blank" rel="noreferrer">Documentation / Examples / Containers / Docker | Lima</a></p>

<h4 class="relative group">Lima Docker Rootless
    <div id="lima-docker-rootless" class="anchor"></div>
    
</h4>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">limactl start template://docker
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">DOCKER_HOST</span><span class="o">=</span><span class="k">$(</span>limactl list docker --format <span class="s1">'unix://{{.Dir}}/sock/docker.sock'</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine</span></span></code></pre></div></div>

<h4 class="relative group">Lima Docker Rootful
    <div id="lima-docker-rootful" class="anchor"></div>
    
</h4>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">limactl start template://docker-rootful
</span></span><span class="line"><span class="cl"><span class="nb">export</span> <span class="nv">DOCKER_HOST</span><span class="o">=</span><span class="k">$(</span>limactl list docker-rootful --format <span class="s1">'unix://{{.Dir}}/sock/docker.sock'</span><span class="k">)</span>
</span></span><span class="line"><span class="cl">docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine</span></span></code></pre></div></div>

<h3 class="relative group">Docker with Colima
    <div id="docker-with-colima" class="anchor"></div>
    
</h3>
<p>Docker client is required for Docker runtime. Installable with brew <code>brew install docker</code>.</p>
<p>You can use the <code>docker</code> client on macOS after <code>colima start</code> with no additional setup.</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew install docker
</span></span><span class="line"><span class="cl">colima start</span></span></code></pre></div></div>

<h2 class="relative group">Linux Support
    <div id="linux-support" class="anchor"></div>
    
</h2>
<p><strong>Both run on Linux hosts.</strong> Lima also supports <a href="https://github.com/lima-vm/lima?tab=readme-ov-file#lima-linux-machines"  target="_blank" rel="noreferrer">non-macOS hosts (Linux, NetBSD, etc.)</a> and <a href="https://github.com/abiosoft/colima?tab=readme-ov-file#features"  target="_blank" rel="noreferrer">Colima’s README lists Linux as supported</a>.</p>
<p>There’s less reason to use Lima/Colima on Linux than on macOS, but it may still be useful in certain cases, since it is another way to run VMs on Linux.</p>

<h2 class="relative group">Apple Container
    <div id="apple-container" class="anchor"></div>
    
</h2>
<p>After years of mac users using projects such as Lima, Colima and others in order to run containers on macOS, Apple released their own solution a few months ago: <a href="https://opensource.apple.com/projects/container/"  target="_blank" rel="noreferrer">Container</a>. This seems like a good solution that likely has good performance. Notably, this solution is not based on Docker, but can nevertheless run OCI containers.</p>
<hr>
<p><em>Featured image by <a href="https://unsplash.com/@creatorsproduce?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">Aarom Ore</a> on <a href="https://unsplash.com/photos/city-on-island-during-day-Yrqyn1Gb80k?utm_source=hugo&utm_medium=referral"  target="_blank" rel="noreferrer">Unsplash</a>.</em></p>
]]></content><author><name>Ro'i Bandel</name></author><category term="tools" label="Tools" scheme="https://www.towerofkubes.com/tags/tools/"/><category term="container" label="Container" scheme="https://www.towerofkubes.com/tags/container/"/><category term="til" label="Til" scheme="https://www.towerofkubes.com/tags/til/"/><category term="snippets" label="Snippets" scheme="https://www.towerofkubes.com/tags/snippets/"/><category term="guide" label="Guide" scheme="https://www.towerofkubes.com/tags/guide/"/><published>2025-10-16T00:00:00Z</published></entry></feed>