This repository builds addon images organized by category under
addons/<category>/<addon>/. Agent addons live in addons/agents/, and developer
tools live in addons/devtools/. New categories are discovered automatically.
Each addon image is an OCI index with a separate image for every supported
architecture. Addons with libc-specific files also have separate images for each
libc, identified by the ai.openkaiden.openshell-build-image.libc descriptor
annotation. Addons that work with either libc omit that annotation. Each selected
image contains only its own files and environment settings.
This example uses the Codex image published from main under the next tag:
ADDON_INDEX=ghcr.io/feloy/openshell-build-image-addons-codex:next
podman manifest inspect "$ADDON_INDEX" | jq -r '
.manifests[] |
[.platform.os + "/" + .platform.architecture,
.annotations["ai.openkaiden.openshell-build-image.libc"],
.digest] | @tsv
'The index has linux/amd64 and linux/arm64 descriptors for both glibc and
musl. To get exactly the linux/amd64 and glibc image digest:
podman manifest inspect "$ADDON_INDEX" | jq -r \
--arg arch amd64 --arg libc glibc '
[.manifests[] |
select(.platform.os == "linux" and
.platform.architecture == $arch and
.annotations["ai.openkaiden.openshell-build-image.libc"] == $libc) |
.digest] |
if length == 1 then .[0] else error("expected exactly one matching addon image") end
'For the main build at commit 7ffc10a, the result is
sha256:037b9b45a992c6825b3c8c210819279bb4ec1e24af92abd95d705efb8abc2c15.
Using that descriptor digest selects the image itself, so a build does not need
the other architecture or libc payloads. The next tag can move, so inspect it
again to get the digest for a later build.
Create a Containerfile with the amd64/glibc base image you want to extend.
This example uses UBI 10 and the digest above:
FROM registry.access.redhat.com/ubi10/ubi:latest
COPY --from=ghcr.io/feloy/openshell-build-image-addons-codex@sha256:037b9b45a992c6825b3c8c210819279bb4ec1e24af92abd95d705efb8abc2c15 / /
ENV CODEX_PATH=/usr/local/bin/codex
ENV PATH=/usr/local/bin:${PATH}Build it for the architecture selected from the index:
podman build --platform linux/amd64 -t codex-example -f Containerfile .COPY transfers the selected image's files, but does not transfer its ENV
settings. Set the environment needed by the addon in the final image. For an
addon index without libc annotations, select by architecture and copy all files
from the selected image root. Such addons can be independent of libc, like GitHub
CLI, or intended for a single libc.
See .github/IMAGE-BUILDS.md for the build and publishing workflows and how to add an addon or category.