Communityコーディング&開発github.com

build-kit-locally

キットをローカルでビルドし、ローカルホストのレジストリに公開して開発テストを実施します。

build-kit-locally とは?

このスキルは、Bottlerocket の core-kit や kernel-kit をローカル環境でビルドし、localhost:5000 で動作する OCI レジストリに公開するための手順を提供します。開発中のキット変更をプロダクションレジストリに影響を与えずにテストできるため、バリアントビルドの検証や反復的なキット開発に最適です。対応プラットフォームは Docker および grove ディレクトリ内のツールチェーン (brdev, twoliter, make) で、キットリポジトリは `kits/` 配下にクローンされていることが前提です。手順に沿って `brdev registry start` でレジストリを起動し、`brdev twoliter use-local-publish` で設定を生成した後、`make build` でキットをビルド、`make publish VENDOR=local` で公開し、最後に `brdev registry list` で公開を確認します。

対応~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に質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

スキル: キットのビルドと公開(ローカル)

目的

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

これにより、キットがベンダープレフィックス "local" で localhost:5000 に公開されます。

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 デーモンが実行中であることを確認してください。

次のステップ

キットを公開した後:

  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

関連スキル