Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
uvx ruff@0.17.4 check .
# DL3008 (pin apt packages' versions) is off on purpose: the packages are Ubuntu's as they are when the
# image is built, and the published image, pinned by digest, is what pins a build's tools (Dockerfile).
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: overpressure/overpressure
path: .overpressure
- name: The documents' links, and AGENTS.md with CLAUDE.md a link to it (overpressure's check-docs)
run: python3 .overpressure/scripts/check-docs.py --repo .
- name: The Dockerfile
run: docker run --rm -i hadolint/hadolint:v2.15.1@sha256:32dac94127fd60b7b7e3fbfc65e1383b9b5e25c9bfd7b8536de7a539fe68a12d hadolint --ignore DL3008 - < image/Dockerfile
- name: The workflows
Expand Down
47 changes: 47 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# AGENTS.md

**overpressure/builder** is the container image every [overpressure](https://github.com/overpressure/overpressure)
build runs in: the userspace, the system image, the kernel ([overpressure/linux](https://github.com/overpressure/linux))
and the packages. It is published as `ghcr.io/overpressure/builder` for amd64 and arm64; its consumers pin it by
digest, which keeps a build's tools the same on every computer. What it holds and how it runs: [README.md](README.md).

The project's rules for issues, documents, code and changes:
[conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md).

## Setup and commands

Docker (or Podman) and [uv](https://docs.astral.sh/uv/), from the repository root:

```sh
python3 -m unittest -v # the recipe test; binfmt tests need bash on x86-64 Linux, hand-back tests root
uvx ruff@0.17.4 format --check . && uvx ruff@0.17.4 check . # the Python code
docker run --rm -i hadolint/hadolint:v2.15.1 hadolint --ignore DL3008 - < image/Dockerfile # the Dockerfile
docker build -t builder:local image # the image
```

CI runs the script tests inside the image, privileged, with the checkout at `/work`, as a build does.

## Layout

- `image/`: the `Dockerfile` (Ubuntu 24.04 pinned by digest) and the scripts it installs: `entrypoint.sh`,
`binfmt.sh` (the aarch64 handler), `hand-back.sh` (files root made go back to the host user).
- `tests/test_image.py`: the scripts' and the recipe's tests. `pyproject.toml`: ruff's settings only, overpressure's.
- `.github/workflows/image.yml`: lint, both variants built and tested, a tag's publication.

## Hard rules

- **The contract holds.** overpressure's tooling and the packages' CI rely on what
[the contract](README.md#the-contract) lists (privileged run, `/work`, `/var/tmp`, the entrypoint's steps, the
scripts' arguments). A change to it is a new image that the consumers pin on purpose.
- **Published images are kept**, so an old pin keeps working. Never pin or hand out the `ci-*` tags: they are CI's
cache of tested variants.
- **Apt packages stay unpinned** (hadolint's DL3008 off): the image, pinned by digest, is what pins the tools.
- Nothing of the image goes onto a headset; its packages keep their own licenses ([License](README.md#license)).

## Changes

A branch and a pull request against `main`, titled as a conventional commit; merged by rebase or squash once `ci`
(the lint and both variants) passes and the code owners approved
([conventions](https://github.com/overpressure/overpressure/blob/main/docs/develop/conventions.md#changes)). A
release is a tag `YYYY.M.PATCH`, this month's next free patch, which publishes the tested variants as one
multi-arch image with a release naming its digest ([publishing](README.md#publishing)).
1 change: 1 addition & 0 deletions CLAUDE.md