Community程式設計與開發github.com

建置並發佈套件組至本地端

建置 Bottlerocket 套件組(core-kit 或 kernel-kit)並發佈到本地 OCI 註冊表,以供開發測試與驗證。

建置並發佈套件組至本地端 是什麼?

此技能可讓開發者在變體建置中測試套件組的更動,無需發佈至正式環境。它支援在 Grove 目錄中工作,要求 Docker 已安裝並執行,且套件組儲存庫已複製至 `kits/` 目錄中。流程包含啟動本地註冊表、設定 `Infra.toml` 指向本地端、執行 `make build` 建置、以 `make publish VENDOR=local` 發佈至 `localhost:5000`,最後透過 `brdev registry list` 驗證。常見問題如連線拒絕或組態缺失皆有對應的解決步驟。完成套件組發佈後,可於變體的 `Twoliter.toml` 中參考新版本、執行 `make update` 並使用 `cargo make` 建置變體。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/build-kit-locally

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

技能:建置並發佈套件組

目的

建置 Bottlerocket 套件組(core-kit 或 kernel-kit)並發佈至本地 OCI 註冊表,以供開發測試與驗證。這樣您就可以在變體建置中測試套件組更動,而無需發佈至正式環境。

使用時機

  • 修改套件組套件並在變體中測試時
  • 進行套件組的反覆開發時
  • 在建置依賴套件組更動的變體映像檔之前

先決條件

  • Docker 已安裝並執行中
  • 在 grove 目錄中工作
  • 套件組儲存庫已複製在 kits/ 目錄中

步驟

1. 確保本地註冊表已執行

brdev registry start

2. 設定使用本地註冊表

cd kits/<kit-name>
brdev twoliter use-local-publish

這會建立指向本地註冊表的 Infra.toml,供發佈使用。

3. 建置套件組

make build

若需特定架構:

make build ARCH=x86_64
# 或
make build ARCH=aarch64

4. 發佈至本地註冊表

make publish VENDOR=local

這會將套件組發佈至 localhost:5000,並使用廠商前綴 "local"。

5. 驗證發佈

brdev registry list

應能在儲存庫清單中看到您的套件組。

驗證

檢查套件組是否可用:

brdev registry list

應回傳已發佈的版本標籤。

常見問題

註冊表未執行:

Error: connection refused

解決方案:執行 brdev registry start

Infra.toml 未設定:

Error: vendor 'local' not found

解決方案:執行 brdev twoliter use-local-publish 以建立組態

Docker 權限遭拒: 解決方案:確認使用者屬於 docker 群組,且 Docker daemon 正在執行

後續步驟

發佈套件組後:

  1. 更新變體的 Twoliter.toml 以參照新的套件組版本
  2. 在變體儲存庫中執行 make update
  3. 使用 cargo make 建置變體

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相關技能