Skip to content

reapply docker build optimizations to Dockerfile.source#568

Merged
CassOnMars merged 1 commit into
QuilibriumNetwork:v2.1.0.24from
dazthecorgi:docker-build-optim
Jun 18, 2026
Merged

reapply docker build optimizations to Dockerfile.source#568
CassOnMars merged 1 commit into
QuilibriumNetwork:v2.1.0.24from
dazthecorgi:docker-build-optim

Conversation

@dazthecorgi

Copy link
Copy Markdown
Contributor

Commit 1bdc940 ("current state of v2.1.0.24") accidentally reverted the build optimizations introduced in PR #551 while landing unrelated changes (ubuntu:22.04 base, upstream protoc, the build-migrate-tool RocksDB stage, qns-api removal). This restores the optimizations on top of those changes:

  • Consolidate the seven parallel gen-* stages (each running generate.sh) into a single gen-rust stage: one cargo build for all leaf crates so shared workspace deps compile once instead of seven times. Artifacts are stashed in /out/ since target/ is a cache mount, and build-context now COPYs --from=gen-rust accordingly.
  • Restore cargo cache mounts (cargo-registry, cargo-git, cargo-target-node) on build-node.
  • Restore Go cache mounts (go-build, go-mod) on build-qclient so a build-context invalidation no longer forces a from-scratch Go rebuild.
  • Extend the same Go cache mounts to the new build-migrate-tool stage for consistency.
  • Restore the explanatory comments on COPY crates and build-qclient.

This brings Dockerfile.source back in line with Dockerfile.sourceavx512, which was untouched by the revert and shares the cargo/go cache ids.

Commit 1bdc940 ("current state of v2.1.0.24") accidentally reverted the
build optimizations introduced in PR QuilibriumNetwork#551 while landing unrelated changes
(ubuntu:22.04 base, upstream protoc, the build-migrate-tool RocksDB stage,
qns-api removal). This restores the optimizations on top of those changes:

- Consolidate the seven parallel gen-* stages (each running generate.sh)
  into a single gen-rust stage: one cargo build for all leaf crates so
  shared workspace deps compile once instead of seven times. Artifacts are
  stashed in /out/ since target/ is a cache mount, and build-context now
  COPYs --from=gen-rust accordingly.
- Restore cargo cache mounts (cargo-registry, cargo-git, cargo-target-node)
  on build-node.
- Restore Go cache mounts (go-build, go-mod) on build-qclient so a
  build-context invalidation no longer forces a from-scratch Go rebuild.
- Extend the same Go cache mounts to the new build-migrate-tool stage for
  consistency.
- Restore the explanatory comments on COPY crates and build-qclient.

This brings Dockerfile.source back in line with Dockerfile.sourceavx512,
which was untouched by the revert and shares the cargo/go cache ids.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CassOnMars CassOnMars merged commit 7bb1f3c into QuilibriumNetwork:v2.1.0.24 Jun 18, 2026
5 checks passed
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.

2 participants