Versioned Dockerfile catalog
The versioned Dockerfile catalog provides one supported container build environment for each covered Solana or Agave release. Verification workflows use the matching environment to build a program with the release's toolchain and then compare the result with the deployed program. The catalog is one part of the broader container build environment system.
Catalog purpose
The catalog turns a release version into a stable build contract. A catalog entry identifies the chain tool set, Rust build base, and platform tools that a verified build must use for that release.
Versioned environment contract
Each docker/v<version>.Dockerfile file represents one release-specific environment. The v prefix is part of the source file name. Published image tags use the same version without that prefix, so the file name and registry tag must remain a matched pair.
The environments provide the command-line tools and build workspace expected by the verification flow. They also fix the base Rust image by digest and check downloaded installer content before use. This makes a rebuild use the same declared inputs instead of a moving image or script.
References: docker/v1.16.0.Dockerfile• L1-8 docker/v2.1.0.Dockerfile• L1-18 docker/v4.1.2.Dockerfile• L1-14
Release family coverage
The catalog spans the supported Solana release history and the later Agave release history. The release family changes the source of the chain tools and the way platform tools are prepared.
| Release group | Environment role |
|---|---|
| Solana 1.10 through 1.14 | Preserve an older Solana release while using the compatibility installer path required by those releases. |
| Solana 1.16 through before 1.18.24 | Install the matching Solana release with its release-era build setup. |
| Solana 1.18.24 and later, plus Agave 2.x through 4.0.x | Use the Agave release line and prepare its platform tools for program builds. |
| Agave 4.1.x and later release trains | Use the release-train build-tool definition needed by that Agave line. |
The catalog does not promise an entry for every numeric upstream tag. The generator excludes invalid, yanked, and known unsupported releases. A missing file therefore means that the normal automatic version lookup cannot select that release's published environment.
References: generate_dockerfiles.py• L140-212 docker/v1.14.1.Dockerfile• L1-14 docker/v1.18.26.Dockerfile• L1-18 docker/v4.1.2.Dockerfile• L1-14
Verification workflow consumption
The verifier treats the catalog as the source of the supported image choices. It first identifies the program's Solana version. It then maps that version to an immutable published image before it starts the container build.
Version selection
The verifier reads an explicit Solana version from the workspace metadata when present. If the workspace does not declare one, it uses a matching package version from Cargo.lock. The resulting version selects an entry in the generated image map, which contains the registry digest for the corresponding published image.
This order matters for programs that do not depend on the main Solana program package. Those programs can state the intended CLI release in their workspace metadata instead of relying on a lockfile package to reveal it. A caller can also provide a custom base image when the catalog has no compatible entry.
The following flow shows how a program version becomes the image used for a build.
flowchart LR
A[Workspace metadata or Cargo.lock] --> B[Solana release version]
B --> C[Generated image map]
C --> D[Published image digest]
D --> E[Container build environment]
References: src/main.rs• L949-975 src/main.rs• L1649-1681 src/image_config.rs• L1-8
Build and verification use
The build flow mounts the program source into the selected image and runs the release-appropriate program build command inside the container. The resulting program binary is the output of the versioned environment rather than the host machine's toolchain.
The image verification flow starts the selected image, obtains the built program artifact, and compares its hash with the deployed program. This lets the same catalog entry support both local deterministic builds and checks of an image-produced result.
References: src/main.rs• L990-1119 src/main.rs• L1143-1239
Catalog lifecycle
The catalog has two linked forms: checked-in Dockerfiles describe how an environment is made, while published registry images provide the environment consumed at build time. Changes move from upstream release data to a reviewed Dockerfile and then to a versioned image.
Dockerfile generation
The generation process discovers Solana and Agave release tags and creates only the entries that match the catalog's supported release rules. It resolves the release's Rust toolchain and installer data before writing a file. The Dockerfile generation page describes those rules in detail.
The normal generation workflow opens a pull request for changed catalog files. A separate maintenance workflow refreshes installer checksums only for files that already exist. This separation keeps routine integrity updates from silently expanding release coverage.
References: generate_dockerfiles.py• L216-251 generate_dockerfiles.py• L282-375 .github/…/generate_dockerfiles.yml• L1-51 .github/…/update_existing_dockerfile_checksums.yml• L1-51
Image publication
Publishing converts a selected Dockerfile into the registry image named solanafoundation/solana-verifiable-build. A single-version workflow accepts a release version. The all-changed workflow derives a version set from changed docker/v*.Dockerfile files and builds those entries in parallel.
The registry tag omits the source file's leading v. After the image is pushed, the workflow records a build provenance attestation. The image build and installation page covers the image build and distribution path beyond this catalog.
The following flow shows the handoff from a catalog definition to the digest consumed by the verifier.
flowchart LR
A[Versioned Dockerfile] --> B[Registry image build]
B --> C[Versioned registry tag]
C --> D[Published image digest]
D --> E[Generated image map]
E --> F[Verification build]
References: .github/…/publish_dockerfile.yaml• L41-67 .github/…/publish_all_dockerfiles.yaml• L13-29 .github/…/publish_all_dockerfiles.yaml• L73-99 update_image_whitelist.py• L42-71
Build input integrity
The catalog fixes the Rust base image by digest and pins the checksum of each installer script that it downloads. These checks protect the main inputs to the build environment. The current verification scope does not yet perform a separate post-install check of the installed toolchain or platform tools, so the catalog is a strong input pin rather than a complete end-to-end environment proof.
References: README.md• L58-70 generate_dockerfiles.py• L47-73 generate_dockerfiles.py• L351-361 docker/v2.1.0.Dockerfile• L1-8
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the
docker/v<version>.Dockerfilename, the registry tag withoutv, and the version extracted by the publishing workflow aligned. - When a catalog entry changes, rebuild and publish its image so the generated image map does not point to an old artifact.
- Update the release-family rule and the installer source together when Solana or Agave moves its release boundary.
- Keep the generated Dockerfile's Rust digest and installer checksum tied to the release metadata that selected them.
- Add the required release-train build-tool mapping before adding an Agave train that needs a new platform-tool definition.
- Preserve the image-map update path when registry tags or digest sources change.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The program version is not present in the image map. | The automatic build stops because no compatible catalog image can be selected. | Add and publish the matching catalog entry or pass an explicit compatible base image. |
| A Dockerfile is published without refreshing the generated image map. | The verifier can keep selecting an older digest or report that the release has no image. | Update the image whitelist after publishing catalog images. |
The source file uses a v-prefixed version while the registry tag or publishing matrix does not match it. | The workflow looks for the wrong file or publishes the wrong version tag. | Treat the file name, extracted version, and registry tag as one contract. |
| A downloaded installer no longer matches its pinned checksum. | The image build fails before the installer runs. | Refresh the existing checksum through the checksum update workflow and review the generated change. |
| Workspace metadata or lockfile data names the wrong Solana release. | The build uses a valid but incompatible environment. | Check the declared workspace version and lockfile dependency before relying on automatic selection. |
Key files
| File | Why to read it |
|---|---|
docker/v1.14.1.Dockerfile | Shows the compatibility environment for an older Solana release. |
docker/v2.1.0.Dockerfile | Shows the standard checksum-pinned Agave environment used by the catalog. |
docker/v4.1.2.Dockerfile | Shows a newer Agave release-train environment with a dedicated build-tool definition. |
| generate_dockerfiles.py | Defines which upstream releases become catalog entries and how their build inputs are fixed. |
| src/image_config.rs | Provides the generated version-to-image-digest map used by automatic image selection. |
| src/main.rs | Shows how the verifier selects a catalog image and uses it for build and image verification. |
| .github/…/publish_dockerfile.yaml | Shows the single-version path from a catalog file to a published and attested image. |
| .github/…/publish_all_dockerfiles.yaml | Shows how changed catalog files become a parallel image publication set. |
| Dockerfile generation | Explains release discovery, environment selection, and catalog maintenance. |
| Image build and installation | Explains how published build environments are built and distributed. |