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 / image-build-and-installation

Image build and CLI installation tooling

The image build and installation scripts support two local tasks around verified builds. One builds the checked-in verifier images that provide versioned Solana or Agave toolchains. The other installs the solana-verify command-line interface (CLI) on a developer machine. Together they prepare the container side and the host side of local verification without replacing the Dockerfile catalog or the CLI workflow.

Tooling role

The scripts sit below Container build environments. The image script consumes the versioned Dockerfiles described in the Versioned Dockerfile catalog, while the installer puts the verifier CLI on the local host. Dockerfile creation remains the job of Dockerfile generation, and verification commands remain the concern of Verifier CLI.

Image build tooling

The fully qualified script build-all-images.sh builds every suitable Dockerfile in docker/ as a local Docker image. Its purpose is to make the supported build environments available for local use, not to discover releases or publish images.

The script uses each Dockerfile name as the image version. For example, v4.1.2.Dockerfile becomes the local image tag solana.v4.1.2. The Dockerfile itself supplies the pinned toolchain and the /build working area, so the script only coordinates the repeated Docker build operation.

Image build flow

The flow moves from the checked-in catalog to local Docker images. A failed Docker build does not stop the loop from attempting later images.

flowchart LR
    A[Versioned Dockerfiles] --> B[build-all-images.sh]
    B --> C[Docker build]
    C --> D[Local solana.v<version> images]

References: build-all-images.sh• L3-18 docker/v4.1.2.Dockerfile• L1-14

CLI installation tooling

The fully qualified script verifier-cli-install.sh installs the prebuilt solana-verify binary for local use. It chooses the download name from the host operating system, downloads the latest binary from the verifier release repository, and places the result where a shell can run it.

The installer supports macOS and Linux in its intended platform model. It also checks processor families and rejects non-macOS ARM, AArch, and PowerPC hosts. Windows is outside the supported installer path. The installer does not build the CLI from source or select a verifier image.

CLI installation flow

The installation flow first obtains a platform binary, then makes it executable and places it in an existing command location or a user directory.

flowchart TD
    A[Detect operating system and processor] --> B{Supported host?}
    B -- No --> C[Stop with support message]
    B -- Yes --> D[Download latest solana-verify binary]
    D --> E[Make binary executable]
    E --> F{Existing solana-verify?}
    F -- Yes --> G[Ask before replacement]
    F -- No --> H[Choose user bin directory]
    G --> I[Installed command]
    H --> I
    I --> J[Check command availability]

References: verifier-cli-install.sh• L1-9 verifier-cli-install.sh• L26-66 verifier-cli-install.sh• L76-123 verifier-cli-install.sh• L156-164

Local command availability

When no existing command is found, the installer prefers ~/.cargo/bin and then falls back to ~/bin. It may add a user directory to the shell startup file. A user may need to restart the shell or call the installed path directly before solana-verify is available in the current session.

When an existing binary is found, replacement is explicit. A declined replacement stops the script and leaves the existing CLI unchanged. This protects a working local installation from an unattended overwrite.

References: verifier-cli-install.sh• L84-105 verifier-cli-install.sh• L107-153 verifier-cli-install.sh• L156-164

Host and container roles

The installed CLI and the verifier image solve different parts of the same local task. The CLI is the host entry point that a developer runs. The image supplies the version-specific build environment used to reproduce a Solana program build.

This separation lets a developer update the host command without changing the historical toolchain image. It also means that a successful CLI installation does not prove that the required image exists locally. The image catalog and the CLI's image selection rules must still agree on the requested release; see Verifier CLI and Container build environments.

Local preparation boundary

Local preparation has two independent outcomes:

OutcomeProduced byUsed for
Versioned Docker imagebuild-all-images.shRebuilding a program in a matching toolchain environment
solana-verify host commandverifier-cli-install.shStarting verification and related CLI operations

The image script does not install the host CLI. The CLI installer does not build or configure Docker images. Keeping these roles separate helps isolate a host setup problem from a missing or failed image build.

References: build-all-images.sh• L3-18 verifier-cli-install.sh• L22-23 README.md• L16-28

Change checklist

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

  • The Dockerfile filename pattern and the local tag rule must stay aligned. A change can make local image names differ from the names expected by image selection or operator instructions.
  • Changes to the catalog or its generated Dockerfiles must be reflected in the set that build-all-images.sh scans. The script only builds files that are present in docker/.
  • Changes to release binary names, operating-system labels, or processor support must stay aligned with the published CLI artifacts.
  • Changes to the install directories or shell startup handling must preserve the final command lookup. A binary can be installed successfully and still be unavailable as solana-verify.
  • Changes to image build error handling must preserve visibility of failed versions. The current loop attempts each image separately.

Important failure modes

TriggerConsequenceGuard
Run build-all-images.sh from a directory that does not contain docker/The script cannot enter the Dockerfile directory and image builds do not use the intended catalog context.Run it from the repository root and confirm the versioned Dockerfiles are present.
Docker is unavailable or a Dockerfile build failsThe affected image is not ready for verification. Later files may still be attempted.Check each build result and confirm the required local tag exists before running a build.
Host operating system or processor is outside the installer's supported setThe installer stops before placing a binary.Use a supported macOS or Linux host or install the CLI by another supported method.
The download fails or produces an empty fileInstallation stops before the binary is moved into place.Check network access and the latest release asset before retrying.
The selected install directory is not on PATHThe installation can finish while solana-verify is not found by the shell.Restart the shell and verify command -v solana-verify; add the actual target directory to PATH if needed.

Key files

FileWhy to read it
build-all-images.shShows the local batch build entry point and its Docker image naming rule.
verifier-cli-install.shShows host detection, binary download, replacement, placement, and command lookup behavior.
docker/v4.1.2.DockerfileShows a current Agave-based verifier image as consumed by the image build script.
docker/v1.14.1.DockerfileShows an older Solana release image in the same catalog.
docker/v1.18.25.DockerfileShows a release image that uses the later Agave distribution path and platform-tool setup.
generate_dockerfiles.pyExplains how the Dockerfiles consumed by the build script are selected and refreshed.
README.mdConnects local CLI installation and Docker prerequisites to the verified-build workflow.