8000 feat(sandbox): name the mikan-managed sandbox oci:<image> by geminixiang · Pull Request #172 · geminixiang/mikan · GitHub
[go: up one dir, main page]

Skip to content

feat(sandbox): name the mikan-managed sandbox oci:<image> - #172

Merged
geminixiang merged 1 commit into
mainfrom
feat/oci-sandbox-name
Oct 11, 2026
Merged

geminixiang merged 1 commit into
mainfrom
feat/oci-sandbox-name

Conversation

@geminixiang
Copy link
Copy Markdown
Owner

為什麼要改

image:<image> 是用「參數」來命名,不是用「這個模式是什麼」:container:<name> 其實也是從 image 跑起來的,兩個名字分不出差別。文件也還把它寫成「Docker」。這個模式真正的內容是:mikan 為每個 office 從 OCI image 建立並管理一個 container,nerdctl、Podman、Docker 都能跑。所以改名為 oci:<image>。

改了什麼

  • 新的寫法:--sandbox=oci:<image>。內部型別 "image" 改為 "oci",ImageSandboxConfig 改為 OciSandboxConfig。
  • 相容性:image:<image> 照樣能用,啟動時印出棄用警告,下一個主要版本移除:
    ⚠ --sandbox=image:ghcr.io/…/mikan-sandbox:latest is deprecated
      use --sandbox=oci:ghcr.io/…/mikan-sandbox:latest; image: will be removed in the next major release
    
  • 不影響既有資料:container 名稱、vault key 都只由 office key 決定,不含型別字串;container 上的內部 label mikan.sandbox=image 刻意不改。所以升級後會沿用既有 container,不會重建,也不需要 migration。
  • 產生的設定:mikan onboard 和 PM2 ecosystem 範本改為產生 oci:。
  • 文件:
    • 四種語言的 /sandbox/image/ 頁面改為 /sandbox/oci/,舊網址會轉址過去
    • 頁面說明舊名稱仍可使用
    • README、CONTEXT.md(新增「OCI sandbox」領域詞)、ARCHITECTURE、ADR、各模組 README 一併更新
    • 描述這個模式時把「Docker container」改成引擎中立的寫法

驗證

項目 結果
oci:ubuntu:24.04 解析成 {type:"oci"},不印警告 新測試,改之前失敗,改之後通過
image:ubuntu:24.04 解析成同樣的設定並印出棄用警告 新測試,改之前失敗,改之後通過
實際 CLI(mikan migrate --dry-run):image: 印出警告、oci: 不印、oci: 不帶 image 時報錯 符合預期
image 模式 Slack E2E(--sandbox oci:…,引擎 Docker) 23 個測試檔、26 個測試全部通過;container 名稱與改名前相同
文件站 113 頁建置成功;四個舊網址都轉址到新頁
本機 gate lint、fmt、knip、build、typecheck、完整測試(2106 通過)、npm 套件檢查

Release note

  • --sandbox=image:<image> 改名為 --sandbox=oci:<image>。舊寫法仍可使用並會印出棄用警告,下一個主要版本移除。既有 container 和 vault 不受影響。請把 PM2 ecosystem 或啟動腳本裡的 image: 改成 oci:。

The mode was named after its argument, image:, which also describes
container:, and its docs still called it Docker. It runs one container
per office from an OCI image on nerdctl, Podman, or Docker, so the
sandbox spec is now oci:<image> and the internal type is "oci".

image:<image> keeps working and logs a deprecation warning until the
next major release. Container names, vault keys, and the managed-
container labels do not include the type, so existing containers are
reused. The docs page moves to /sandbox/oci/, with redirects from the
old URLs.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying mikan with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac09cd4
Status: ✅  Deploy successful!
Preview URL: https://9e1c337c.mikan-1wv.pages.dev
Branch Preview URL: https://feat-oci-sandbox-name.mikan-1wv.pages.dev

View logs

@geminixiang
geminixiang merged commit 47aeb08 into main Oct 11, 2026
7 checks passed
@geminixiang
geminixiang deleted the feat/oci-sandbox-name branch October 11, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet
49A1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0