Introducing a new way to review your PRs.

Read the announcement

solana-foundation / solana-verifiable-build

CLI tool for deterministically building and verifying executable against on-chain programs or buffer accounts

View on GitHub

18 documents · Updated Nov 23, 2026

docs / dockerfile-publishing-and-releases

Dockerfile publishing and releases

This repository publishes versioned Solana build environments as Docker images. A maintainer can publish one image for a known version or publish every changed version in a commit range. The image tags, Dockerfile revisions, generated image whitelist, and pinned image digests must stay aligned so that users can select a known build environment and the verifier can trust its image digest.

Publishing model

The publishing system turns checked-in versioned Dockerfiles into tagged Docker Hub images. It keeps Docker image publishing separate from the general solana-verify package release, while the two release paths share the same need for clear version and source state.

Versioned image contract

Each versioned Dockerfile represents one Solana or Agave build environment. The file name uses the form docker/vX.Y.Z.Dockerfile, while the public image uses the matching tag without the leading v, such as docker.io/solanafoundation/solana-verifiable-build:4.1.2. The Docker build also records source metadata and produces a provenance attestation for the pushed image.

This contract lets a caller map a requested toolchain version to one stable image tag. A missing file, a mismatched version, or a changed Dockerfile without a new published image breaks that mapping. The verifier then selects the published image by its pinned digest rather than trusting a mutable tag alone.

References: .github/…/publish_dockerfile.yaml• L41-67 .github/…/publish_all_dockerfiles.yaml• L73-99 docker/v4.1.2.Dockerfile• L1-14 README.md• L72-76

Image destinations

Both Dockerfile publishing workflows log in to Docker Hub and push to docker.io/solanafoundation/solana-verifiable-build. The individual workflow name mentions GHCR, but its registry and image destination are Docker Hub. The generated tags therefore define the public image versions that downstream whitelist data must track.

References: .github/…/publish_dockerfile.yaml• L1-19 .github/…/publish_dockerfile.yaml• L34-57 .github/…/publish_all_dockerfiles.yaml• L42-49 .github/…/publish_all_dockerfiles.yaml• L66-89

Publishing workflows

The repository provides two manual workflows because publishing one known version and publishing a group of changed versions have different safety needs. Both workflows build from the checked-in docker/ directory and attach build provenance after a successful push. They are part of the wider repository automation, which uses separate workflows for preparation, publication, and downstream trust data.

Individual image publishing

Publish Docker Image accepts one required version such as 1.16.0. It builds docker/v<version>.Dockerfile, pushes the matching version tag, and publishes a provenance attestation. Use it when one Dockerfile needs publication and the desired version is already known.

The workflow does not generate or repair the Dockerfile. The requested version must already resolve to a file in the repository, and the caller must confirm that the file represents the image that should become public.

References: .github/…/publish_dockerfile.yaml• L1-13 .github/…/publish_dockerfile.yaml• L48-67

Changed image publishing

Publish All Changed Images accepts a starting commit hash and compares it with the workflow's current commit. It selects changed, non-deleted files that match docker/v*.Dockerfile, extracts their versions, and creates one publish job per version. If the range contains no matching files, the publish jobs do not run.

The workflow publishes the changed set rather than the full historical set of Dockerfiles. Its parallel jobs do not cancel each other after one failure, so a run can report which versions need a retry.

References: .github/…/publish_all_dockerfiles.yaml• L1-10 .github/…/publish_all_dockerfiles.yaml• L12-41 .github/…/publish_all_dockerfiles.yaml• L51-99

Dockerfile preparation

The Generate Dockerfiles workflow refreshes versioned Dockerfiles and opens a signed pull request. It is a preparation step, not a publish step. After the pull request is merged, a maintainer chooses an image publishing workflow based on whether one version or a changed set needs publication.

For the rules that select toolchains and produce these files, see Dockerfile generation. For the wider role of manual and automatic GitHub workflows, see GitHub workflow orchestration.

References: .github/…/generate_dockerfiles.yml• L1-9 .github/…/generate_dockerfiles.yml• L28-50 generate_dockerfiles.py• L282-374

Release sequence

Docker image publication is a small release process with a required order. The source change must become part of the default branch before the image and its downstream digest data are treated as current.

Publication stages

The normal sequence moves from source change to public image and then to verifier data. This diagram shows the relationship between the workflows and the pull requests they create.

flowchart LR
    A[Generate or review versioned Dockerfiles] --> B[Merge Dockerfile change]
    B --> C{Choose publish scope}
    C -->|One version| D[Publish Docker Image]
    C -->|Changed versions| E[Publish All Changed Images]
    D --> F[Docker Hub image and attestation]
    E --> F
    F --> G[Update image whitelist]
    G --> H[Merge whitelist pull request]

The whitelist update is separate from image publication because it records the digest that users and verification code should accept. Keep the image publish step between the Dockerfile merge and the whitelist pull request merge, as described in the image whitelist maintenance page.

References: RELEASE.md• L82-89 .github/…/update_whitelist.yaml• L1-10 .github/…/update_whitelist.yaml• L37-56

Release boundaries

The Release workflow is the canonical path for the Rust package release. It changes package version data, builds Linux and macOS binaries, creates the Git tag and GitHub release, and publishes to crates.io. It does not replace either Docker image publishing workflow. The repository README also identifies build.yml as a manual artifact build path for a specific ref rather than the canonical release path.

Use the Docker publishing workflows for versioned build images. Use the package release workflow for the solana-verify binary and crate. When both release types are part of one product change, keep their version references and downstream updates coordinated rather than assuming that one workflow publishes the other. For the broader release workflow map, see GitHub workflow orchestration.

References: RELEASE.md• L3-7 RELEASE.md• L15-29 RELEASE.md• L61-71 .github/…/release.yml• L332-496 README.md• L84-89

Registry and downstream state

Publishing creates public image state, while whitelist maintenance copies that state into the verifier's source tree. The two systems form one trust path: an image can be available in Docker Hub before the repository accepts its digest.

Image whitelist synchronization

Update Docker Image Whitelist runs after a push to master that changes docker/**, or by manual dispatch. It reads published image tags from Docker Hub, converts version tags to image digests, writes the generated src/image_config.rs map, and opens a signed pull request. The update should follow image publication so the map describes images that already exist.

The generated map is downstream data, not a second Docker publishing source. For its tag and digest rules, see image whitelist maintenance.

References: .github/…/update_whitelist.yaml• L1-10 .github/…/update_whitelist.yaml• L33-56 update_image_whitelist.py• L10-43 update_image_whitelist.py• L45-92 src/image_config.rs• L1-8

Publishing credentials and attestations

The workflows use the release-automation environment and obtain Docker Hub credentials through the repository's OIDC connection to Doppler. They grant package write access and attestation permissions only for the publish job. Each successful image push then sends its digest to the build provenance service.

This boundary keeps secrets out of Dockerfile inputs and gives consumers a record that links the published image to the repository source used by the workflow.

References: .github/…/publish_dockerfile.yaml• L15-32 .github/…/publish_dockerfile.yaml• L62-67 .github/…/publish_all_dockerfiles.yaml• L44-64 .github/…/publish_all_dockerfiles.yaml• L94-99

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the docker/vX.Y.Z.Dockerfile file name, the workflow input, and the Docker Hub tag on the same version format. The file and input use a leading v only where the workflow adds it to the path.
  • When the changed-file selection or its version extraction changes, verify that the complete-set workflow still excludes deleted Dockerfiles and does not publish an empty matrix.
  • When the image repository or tag format changes, update the whitelist source and the consumer map together. The whitelist parser accepts version tags without the leading v.
  • When the Dockerfile generation rules change, publish newly generated or changed files only after the generated pull request is merged.
  • When publish permissions, the release environment, or the registry changes, verify both publish workflows and the provenance subject name.
  • When a Dockerfile merge changes docker/**, allow the whitelist workflow to create its update pull request after the image tags are available.
  • When the image selection or digest policy changes, keep the README guidance and the whitelist-backed verifier behavior aligned.

Important failure modes

TriggerConsequenceGuard
A requested version has no matching docker/v<version>.DockerfileThe individual publish build cannot use the requested image definitionCheck the merged file name before starting the workflow
The commit range contains only deleted Dockerfiles or no matching DockerfilesThe complete-set workflow has no versions to publishUse a range that includes the intended Dockerfile additions or edits
Dockerfiles are merged but images are not published before whitelist maintenanceThe generated whitelist can omit the new versions or record stale registry statePublish the changed images before merging the whitelist pull request
A Dockerfile is changed without a matching version tag updateThe public tag can no longer clearly identify the source build environmentTreat the versioned file and image tag as one release unit
Registry credentials or attestation permissions are unavailableThe build may complete locally but the public image or provenance record is missingRun the workflows in the configured release-automation environment
A publish matrix job fails for one versionThat version is not public even if other matrix jobs succeedRead the per-version result and retry the failed version with the individual workflow
A verifier uses a tag without the accepted digest entryThe build image is not pinned to the trusted image stateComplete whitelist maintenance after publication and use the pinned digest

Key files

FileWhy to read it
.github/…/publish_dockerfile.yamlDefines the one-version image publishing contract, registry destination, tag, and attestation.
.github/…/publish_all_dockerfiles.yamlDefines changed-file discovery and parallel publishing for a commit range.
.github/…/generate_dockerfiles.ymlShows how Dockerfile changes reach review before publication.
.github/…/update_whitelist.yamlConnects published Docker Hub state to the generated whitelist pull request.
RELEASE.mdGives the release order and explains how Docker image publication relates to the package release.
README.mdStates the user-facing build-image selection and release guidance.
generate_dockerfiles.pyExplains the source rules behind the versioned Dockerfiles when a generated file needs review.
update_image_whitelist.pyExplains how public image tags become digest entries for verification.
docker/v4.1.2.DockerfileProvides a concrete example of the versioned Dockerfile shape without requiring a survey of every version.