Skip to content

feat: build individual docker images locally #3309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 4, 2025

Conversation

sveitser
Copy link
Collaborator

@sveitser sveitser commented May 23, 2025

  • feat: support single image build with optimized compilation
  • maintain backwards compatibility: without arguments we still build
    everything.
  • feat: option to clean
  • fix: avoid installing rust toolchain when starting cargo build in
    container
  • feat: allow compiling with profiles other than --release, here the
    default is changed to use the new test-docker profile since
    release builds are very slow and rarely needed for local development.
    The new profile is needed because without stripping the sequencer
    image is 4.5 GB instead of 1.5 GB.
  • test: add test script to test some invocations of the build script.

How to test

These scripts are currently not run on the CI. To see if it's working locally:

  1. Run scripts/build-docker-images-native --help and try some invocations.
  2. Run scripts/test-build-docker-images-native, be aware it does a clean the end.

sveitser added 6 commits May 23, 2025 15:08
This allows for faster iterations on local docker builds.
Check if this speeds up the slow cross compiled builds in the CI.
- feat: support single image build with optimized compilation
- maintain backwards compatibility: without arguments we still build
  everything.
- feat: option to clean
- fix: avoid installing rust toolchain when starting cargo build in
  container
- feat: allow compiling with profiles other than --release, here the
  *default is changed* to use the new `test-docker` profile since
  release builds are very slow and rarely needed for local development.
- test: add test script to test some invocations of the build script.
@sveitser sveitser changed the title Docker image optimizations feat: build individual docker images locally Jun 4, 2025
@sveitser sveitser marked this pull request as ready for review June 4, 2025 13:47
scripts/build-docker-images-native

# build only the deploy image
scripts/build-docker-images-native --image deploy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👐

Copy link
Contributor

@tbro tbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@sveitser sveitser merged commit d4d71d1 into main Jun 4, 2025
107 checks passed
@sveitser sveitser deleted the ma/docker-image-optimizations branch June 4, 2025 16:27
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.

3 participants