<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Macos on omegaatt</title>
    <link>https://www.omegaatt.com/tags/macos/</link>
    <description>Recent content in Macos on omegaatt</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>zh-TW</language>
    <managingEditor>raiven.kao@gmail.com (Raiven Kao)</managingEditor>
    <webMaster>raiven.kao@gmail.com (Raiven Kao)</webMaster>
    <copyright>Raiven Kao 2020 - 2026</copyright>
    <lastBuildDate>Sat, 19 Apr 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.omegaatt.com/tags/macos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>告別 Docker Desktop 束縛！macOS 容器實戰：colima &#43; k8s &#43; containerd 踩坑遷移全記錄</title>
      <link>https://www.omegaatt.com/blogs/develop/2025/colima_docker_alternative_on_macos/</link>
      <pubDate>Sat, 19 Apr 2025 00:00:00 +0000</pubDate><author>raiven.kao@gmail.com (Raiven Kao)</author>
      <guid>https://www.omegaatt.com/blogs/develop/2025/colima_docker_alternative_on_macos/</guid>
      <description>&lt;h2 id=&#34;前言&#34;&gt;前言&lt;/h2&gt;
&lt;p&gt;身為一個開發者，特別是在 macOS 環境下，Docker Desktop 幾乎是容器化開發的標配。然而，自從 Docker Desktop 開始針對大型企業調整其&lt;a href=&#34;https://www.ithome.com.tw/news/146537&#34;&gt;授權模式&lt;/a&gt;後，許多開發者開始尋找替代方案。&lt;/p&gt;
&lt;p&gt;市面上確實出現了一些選擇，例如閉源但功能強大的 &lt;a href=&#34;https://orbstack.dev/&#34;&gt;OrbStack&lt;/a&gt;。但對於熱愛開源的我來說，目光自然投向了社群。這時，&lt;a href=&#34;https://github.com/abiosoft/colima&#34;&gt;colima&lt;/a&gt; 這個開源專案進入了我的視野。它不僅提供了一個在 macOS 上運行 Linux 容器的輕量級方式，還內建了 Kubernetes 支援，引起了我極大的興趣。&lt;/p&gt;
&lt;p&gt;這篇文章，想記錄一下我從 Docker Desktop 轉換到 colima，並且在 colima 的 Kubernetes 環境中，從原本依賴 Docker Engine 逐步遷移到使用 containerd 作為容器執行時（Container Runtime）的心路歷程與踩坑經驗。&lt;/p&gt;
&lt;h2 id=&#34;lima-與-colima-簡介&#34;&gt;lima 與 colima 簡介&lt;/h2&gt;
&lt;p&gt;在深入 colima 之前，得先提一下 &lt;a href=&#34;https://github.com/lima-vm/lima&#34;&gt;lima (Linux virtual machines on macOS)&lt;/a&gt;。lima 是一個旨在於 macOS 上輕鬆運行 Linux 虛擬機的開源專案。它底層利用了 macOS 的虛擬化框架（如 QEMU 或更高效的 &lt;code&gt;vz&lt;/code&gt;），提供了一個相對輕量的 Linux VM 環境。&lt;/p&gt;
&lt;p&gt;而 colima 則可以看作是建立在 lima 之上的「使用者友善層」。它簡化了 lima 的配置，並專注於提供容器執行時環境。colima 可以讓你輕鬆地啟動一個配置好 Docker 或 containerd 的 Linux VM，並且可以選擇性地啟用 Kubernetes (K3s) 支援。簡單來說，colima 幫你處理了建立 VM、安裝 Runtime 等繁瑣步驟，讓你專注在容器本身。&lt;/p&gt;</description>
    </item>
    <item>
      <title>建構多平台的 container image</title>
      <link>https://www.omegaatt.com/blogs/develop/2025/building_multiple_platform_container_image/</link>
      <pubDate>Sun, 30 Mar 2025 00:00:00 +0000</pubDate><author>raiven.kao@gmail.com (Raiven Kao)</author>
      <guid>https://www.omegaatt.com/blogs/develop/2025/building_multiple_platform_container_image/</guid>
      <description>&lt;h2 id=&#34;前言&#34;&gt;前言&lt;/h2&gt;
&lt;p&gt;最近在搞 side project 時，常常需要在不同的 CPU 架構上跑我的應用程式。例如，開發用的 MacBook 是 ARM 架構 (Apple Silicon)，開發用的 Desktop 是 x86 架構（Ryzen 5900X），而部署的伺服器可能是 x86 (AMD64)，有時候甚至想在 Raspberry Pi (ARM) 上跑些小東西。每次都要為不同平台分別建構 image 實在有點麻煩，而且 Registry 上一堆 &lt;code&gt;xxxapp-amd64&lt;/code&gt;, &lt;code&gt;xxxapp-arm64&lt;/code&gt; 的 tag 看了也很礙眼。經過一番研究與嘗試，是時候接觸 Docker Buildx 了。&lt;/p&gt;
&lt;h2 id=&#34;為什麼需要多平台映像檔&#34;&gt;為什麼需要多平台映像檔&lt;/h2&gt;
&lt;p&gt;在 wintel 的商業策略下，以及大家對高性能伺服器的普遍認知，主要用 x86/amd64，但現在 ARM 架構越來越普及，從 Apple Silicon 的 Mac、AWS Graviton 處理器、各種 IoT 設備到你的 Raspberry Pi，ARM 無所不在。如果你的 container image 只支援 amd64，那它就無法在這些 ARM 設備上原生運行 (需要模擬，效能差)。為了&lt;a href=&#34;https://en.wikipedia.org/wiki/Write_once,_run_anywhere&#34;&gt;Build Once, Run Anywhere&lt;/a&gt;，多平台映像檔 (Multi-platform images) 就是 meta。&lt;/p&gt;
&lt;h2 id=&#34;oci-多平台映像檔架構簡述&#34;&gt;OCI 多平台映像檔架構簡述&lt;/h2&gt;
&lt;p&gt;其實不複雜。傳統的單一平台 image，它的 manifest 指向一組設定檔和一堆 layer。而多平台 image 則是透過一個 manifest list (索引) 指向多個特定平台的 manifest。每個特定平台的 manifest 才各自指向該平台的設定檔和 layer。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
