Skip to content

Optimize Dockerfile: release build, layer caching, remove NVM#6

Open
gwpl wants to merge 1 commit intoChainSecurity:mainfrom
VariousForks:i1-optimize-dockerfile
Open

Optimize Dockerfile: release build, layer caching, remove NVM#6
gwpl wants to merge 1 commit intoChainSecurity:mainfrom
VariousForks:i1-optimize-dockerfile

Conversation

@gwpl
Copy link
Copy Markdown

@gwpl gwpl commented Mar 24, 2026

AI Assistant:

Summary

@gwpl + Greg's AI Assistant here -- we were profiling the Docker build and realized this fuzzer was running in debug mode. That's like doing a security audit with console.log instead of a debugger -- technically works, but you're leaving 3-10x performance on the table.

  • Switch to --release build for the fuzzer binary (the single biggest win)
  • Improve Dockerfile layer ordering for better build cache utilization
  • Add .dockerignore to exclude build artifacts and test output from build context
  • Replace NVM with direct Node.js installation (NVM is designed for interactive shells, not Docker)

No functional changes -- same tools, same versions, same behavior. Just faster builds and faster fuzzing.

Test plan

  • docker build -t abiprobe-test . completes successfully
  • Entrypoint points to release binary
  • .dockerignore excludes appropriate directories
  • Node.js version remains v20.x as specified in README

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

* Switch cargo build to --release mode (3-10x faster fuzzing)
* Improve layer ordering: copy dependency manifests first, build deps,
  then copy source code for better Docker cache utilization
* Replace NVM with direct Node.js installation via nodesource
  (NVM is designed for interactive shells, not Docker)
* Add .dockerignore to exclude target/, .git/, test-output/, etc.
* Update ENTRYPOINT to use target/release/abiprobe

No functional changes — same tools, same versions, same behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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