This repository provides a Docker build setup for snarkOS, a decentralized operating system powering Aleo.
It supports multi-architecture builds (x86_64 and ARM64) and is optimized for reproducible image builds.
git clone git@github.com:AleoNet/snarkos-docker.git
cd snarkos-dockerdocker build \
--build-arg COMMIT_OR_TAG=<tag-or-commit> \
-t snarkos:${tag} \
-f Dockerfile .Example:
docker build \
--build-arg COMMIT_OR_TAG=8c7ea6c \
-t ${tag} .docker run --rm -it snarkos:tag startTo confirm the binary version inside the container, run:
docker run --rm snarkos:${tag} --versionThe Dockerfile performs a two-stage build:
- Builder stage uses
cargoto compile snarkOS (and ledger-distribution, for the ledger-distribution image). - Runtime stage installs minimal runtime dependencies and copies the final binary.
The Build and Push SnarkOS workflow builds one of two images from a snarkOS tag or commit:
| Image choice | Dockerfile | Tag | Entrypoint |
|---|---|---|---|
snarkos |
service/snarkos/Dockerfile |
aleohq/snarkos:<tag> |
/aleo/bin/snarkos |
ledger-distribution |
service/ledger-distribution/Dockerfile |
aleohq/snarkos:<tag>-ledger-distribution |
/aleo/bin/snarkos; the image also has /aleo/bin/ledger-distribution |
ledger-distribution uploads a node's blocks to the block CDN bucket (see its README). The crate exists in snarkOS from testnet-v4.13.0; the build fails for older tags. Run it from the same snarkOS tag as the node whose ledger it reads:
docker run --rm --entrypoint /aleo/bin/ledger-distribution aleohq/snarkos:<tag>-ledger-distribution <network ID>This repo supports native or emulated builds for:
x86_64(Linux)arm64(Raspberry Pi, M1/M2 Macs, cloud ARM VMs)
To build cross-platform images using buildx, see buildx docs.
- This repository includes a Gitleaks scanner to detect secrets in PRs.
- Branch protection rules enforce pull requests for changes to
main.
This repo wraps the official snarkOS and is maintained by the community.
Please refer to the original repo for protocol-level documentation.
All builds from aleo-labs-protocol/snarkOS releases
are automatically built and published to Docker Hub:
👉 https://hub.docker.com/r/aleohq/snarkos
docker pull aleohq/snarkos:latest
docker run --rm aleohq/snarkos:latest --version