node icon indicating copy to clipboard operation
node copied to clipboard

build(docker): optimize multi-stage build for op-node and geth

Open NanoMindExplorer opened this issue 2 months ago • 2 comments

Summary

This PR refactors the Dockerfile to provide a cleaner, safer, and more efficient build process for both op-node and geth.

Changes

  • Split the Dockerfile into three distinct stages (op-node, geth, and final image)
  • Added pipefail and set -e for better error detection during build
  • Added explicit branch and commit validation for reproducible builds
  • Reduced image size by combining RUN layers and removing apt cache
  • Added metadata labels and fixed binary permissions
  • Replaced CMD with ENTRYPOINT for proper signal handling under supervisord

Motivation

Improves image reproducibility, security, and build performance.
Makes future maintenance easier by isolating build stages and improving readability.

Testing

  • Built successfully with Docker 24.0+
  • Verified that both geth and op-node binaries run correctly inside container
  • Supervisor starts and manages both processes as expected

NanoMindExplorer avatar Oct 21 '25 09:10 NanoMindExplorer

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

cb-heimdall avatar Oct 21 '25 09:10 cb-heimdall

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 14 '25 14:11 github-actions[bot]

This pull request was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Nov 23 '25 00:11 github-actions[bot]