Skip to content

Remove Bazel: Phase 5/9 - #17356

Draft
nalepae wants to merge 1 commit into
bazel-phase-4from
bazel-phase-5
Draft

Remove Bazel: Phase 5/9#17356
nalepae wants to merge 1 commit into
bazel-phase-4from
bazel-phase-5

Conversation

@nalepae

@nalepae nalepae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?
Other

What does this PR do? Why is it needed?
This PR implements Phase 5: Implement hermetic release docker image build of:

The new make help is now:

Prysm - Ethereum consensus client

Commands:
  make run <bin> [flags=...] [-- <args>]       Run a binary
  make build [<bin>...] [flags=...]            Build a binary (default: all)
  make gen [<kind>...] [mode=force|no-force]   Create generated code (default: all,no-force)
  make test [<kind>...] [mode=no-race|race]    Run unit tests (default: all,no-race)
  make e2e [<scenario>|<suite>...]             Run end-to-end tests (default: presubmit)
  make dist [<bin>...] [platform=...]          Build official release binaries (docker/<arch> also packages an OCI image)
  make testdata                                Pre-fetch external spec-test data
  make clean                                   Clean everything
  make help                                    Show this help

Options:
  <bin>:           beacon-chain client-stats prysmctl validator
  gen <kind>:      proto ssz mocks
  test <kind>:     mainnet mainnet-spectest minimal minimal-spectest
  e2e <scenario>:  minimal builder web3signer slasher slashing scenario scenario-multiclient postmerge statediff mainnet multiclient
  e2e <suite>:
    presubmit:       minimal statediff slashing slasher
    postsubmit:      builder postmerge mainnet multiclient
    scenario_tests:  scenario scenario-multiclient
  dist <bin>:      beacon-chain validator client-stats prysmctl
  dist platform:   linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 docker/amd64 docker/arm64

Notes:
  After '--', pass '--flag value' (not '--flag=value')
  'make dist SOURCE_DATE_EPOCH=<unix-seconds>' pins the build timestamp (reproducible build)

With the important line being:

  dist platform:   linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 docker/amd64 docker/arm64

docker/arm64 and docker/amd64 Docker images can be built using:

make dist platform=docker/amd64,docker/arm64

Using

make dist

without any parameters builds all binaries as previously + the Docker images.

Docker images are written in the dist directory, as following:

beacon-chain-v7.1.8-linux-amd64.tar beacon-chain-v7.1.8-linux-arm64.tar prysmctl-v7.1.8-linux-amd64.tar     prysmctl-v7.1.8-linux-arm64.tar     validator-v7.1.8-linux-amd64.tar    validator-v7.1.8-linux-arm64.tar

To load the docker images in the local registry, use the docker load command.
Example:

docker load -i dist/beacon-chain-v7.1.8-linux-arm64.tar
422a511108d9: Loading layer [==================================================>]  10.32MB/10.32MB
db88fd86fa06: Loading layer [==================================================>]  24.89MB/24.89MB
Loaded image: gcr.io/offchainlabs/prysm/beacon-chain:v7.1.8
Loaded image: gcr.io/offchainlabs/prysm/beacon-chain:v7.1.8-portable

And then:

docker run gcr.io/offchainlabs/prysm/beacon-chain:v7.1.8

To test the reproducibility of the builds you can pin SOURCE_DATE_EPOCH, build 2 times and run the diff command against the 2 generated dist directories. They should contain no difference.
Example

SOURCE_DATE_EPOCH=1781515081 make dist platform=docker/amd64,docker/arm64

Finally, to build a "convenience" docker image (not suitable for releases, but fast to build), you can use:

docker build [--build-arg BIN=beacon-chain|validator|prysmctl] -t <name>

Default BIN is beacon-chain.

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • I have added a description with sufficient context for reviewers to understand this PR.
  • I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).

@nalepae nalepae mentioned this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant