This repository builds the base layers consumed by the agent images. Use it when adding a new base OS, tweaking packages, or validating the base matrix.
- Docker (
docker --version). - QEMU/binfmt for multi-arch builds.
- Bats (
bats --version) for smoke suites. - Python 3.11+ with
pip install -r requirements-dev.txtto pull lint/test tooling. yqis required by some scripts that parsebase.yml.
python -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txtbases/<alias>/base.yml— Defines the upstream image and installer for each base.Dockerfile— Docker build entrypoint.scripts/— Build/test helpers.tests/bases/smoke/— Bats suites for base images.config.yml— Default repository, version, and platform settings.
Setting from config.yml:
AICAGE_IMAGE_REGISTRY(defaultghcr.io)AICAGE_IMAGE_BASE_REPOSITORY(defaultaicage/aicage-image-base)AICAGE_IMAGE_BASE_SOURCE_REPOSITORY(defaultaicage/aicage-image-base)AICAGE_BUILD_BASE_FILTER(default".*"; use a regex such as"ubuntu|alpine")AICAGE_VERSION(defaultdev) Base aliases come from folders underbases/.
To test releases from a fork:
-
Fork the repository.
-
Enable GitHub Actions on the fork.
-
Update
config.ymlfor the fork namespace, for example:AICAGE_IMAGE_BASE_REPOSITORY: aicage-dev/aicage-image-base AICAGE_IMAGE_BASE_SOURCE_REPOSITORY: aicage-dev/aicage-image-base AICAGE_BUILD_BASE_FILTER: "ubuntu|alpine"
-
Push a Git tag to trigger the publishing workflow. Prefer prerelease-style tags such as
0.1.0-beta.1or0.1.0-alpha.1. -
First release action run only:
- One image building job likely fails with "cannot delete last/only tag of a package".
- Wait until the action run ends with failure, but many other successful building jobs.
- Then "Rerun failed jobs" in that action run.
-
Make the published GHCR package public.
# Build and load a single base
scripts/debug/build.sh --base ubuntu
# Build all bases (platforms from config/environment)
scripts/debug/build-all.sh# Run smoke tests for all bases
scripts/debug/test-all.shSmoke suites live in tests/bases/smoke/ (including subfolders); run individual files with
bats tests/bases/smoke/<path>.bats.
- Create
bases/<alias>/base.ymlwithfrom_imageandos_installer. - Add or adjust installer scripts if the base needs extra setup.
- Update smoke coverage under
tests/bases/smoke/if the new base requires validation. - Document the new base in
README.mdif it should be visible to users.
aicage-image-base/.github/workflows/build-<alias>.yml builds and publishes base images (multi-arch)
on tags, producing <alias>-<version> and <alias> tags.