Skip to content

Conversation

@kevaundray
Copy link
Contributor

@kevaundray kevaundray commented Oct 27, 2025

Issue Addressed

Currently whenever we build the Dockerfile file for local development using kurtosis , it recompiles everything on my laptop, even if no changes are made. This takes about 120 seconds on my laptop (might be faster on others).

Proposed Changes

Conservatively, I created a new Dockerfile.dev, so that the original file is kept the same, even though its pretty similar.

This uses --mount-type=cache saving the target and registry folder across builds.

Usage

docker build -f Dockerfile.dev -t lighthouse:dev .

Additional Info

  • If you immediately redo the above command, it should have no effect, ie it shouldn't rebuild
  • Modifying the cli crate gives about a 6x speedup from scratch, and modifying consensus gives about a 2x speedup

@kevaundray
Copy link
Contributor Author

kevaundray commented Oct 27, 2025

Note: the local_testnet kurtosis script has not been changed and still uses Dockerfile

@jimmygchen
Copy link
Member

Thanks @kevaundray, I haven't had a chance to try it out, but this is great!

@jimmygchen jimmygchen added the ready-for-review The code is ready for review label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devex ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants