Skip to content

[docker] consolidate dockerfiles#1007

Open
fdupress wants to merge 1 commit into
mainfrom
docker-consolidate
Open

[docker] consolidate dockerfiles#1007
fdupress wants to merge 1 commit into
mainfrom
docker-consolidate

Conversation

@fdupress
Copy link
Copy Markdown
Member

This allows us to parameterise later layers on earlier ones.

In practice, I want to use this to avoid rebuilding the base layer in PR and merge queue runs, building it only on main and release branches and tags. As a drive-by bonus, this means we can cache the base and build layers for reuse when building the test layer.

I've also added a hook to allow building from a local working copy. (By providing an EC_REPO argument when building the test target.) This should allow us to pre-build the test image once and for all for all post-build checks. (Using . as EC_REPO, perhaps—haven't really thought that far.)

@fdupress fdupress self-assigned this May 13, 2026
@fdupress fdupress marked this pull request as ready for review May 14, 2026 08:38
@fdupress fdupress requested a review from strub May 14, 2026 08:38
@fdupress fdupress added the chore Ungrateful tasks that need done but that nobody wants to do label May 14, 2026
@fdupress fdupress marked this pull request as draft May 14, 2026 18:21
@fdupress
Copy link
Copy Markdown
Member Author

Converting to draft again, I think I want to also separate build-base as a layer. Doing so will require (ideally) identifying when we need to rebuild it due to EC dependency changes. But we can also let the full build layer install and update new EC deps in PRs and such.

To be discussed briefly.

@fdupress fdupress force-pushed the docker-consolidate branch from 58554e6 to 58d208a Compare May 15, 2026 18:03
@fdupress fdupress changed the base branch from main to docker-binary-alt-ergo May 15, 2026 18:04
@fdupress fdupress force-pushed the docker-consolidate branch from 58d208a to a26cd8b Compare May 15, 2026 18:05
Base automatically changed from docker-binary-alt-ergo to main May 18, 2026 13:14
This allows us to parameterise later layers on earlier ones.

In practice, I want to use this to avoid rebuilding the `base` layer in
PR and merge queue runs, building it only on `main` and release branches
and tags. As a drive-by bonus, this means we can cache the `base` and
`build` layers for reuse when building the `test` layer.

I've also added a hook to allow building from a local working copy. (By
providing an EC_REPO argument when building the `test` target.) This
should allow us to pre-build the test image once and for all for all
post-build checks. (Using `.` as EC_REPO, perhaps—haven't really thought
that far.)
@fdupress fdupress force-pushed the docker-consolidate branch from a26cd8b to 7019e6d Compare May 18, 2026 15:06
@fdupress fdupress marked this pull request as ready for review May 18, 2026 15:10
@fdupress
Copy link
Copy Markdown
Member Author

@strub this is now ready for review. It is only a refactor, which should not change any measurable behaviour (including on build time), but gives us the flexibility to change measurable behaviour later down the line. (In practice, a build of the test box, for example, can "shortcut" the build by specifying an intermediate base, base-build or build image to use as a build argument.)

See #1008 to see how I intend to use this to shortcut the PR builds.

@fdupress
Copy link
Copy Markdown
Member Author

A happy and coincidental side effect of this is to make the build possible using podman. (Accidentally found this out by absent-mindedly building this on a machine that symlinks docker to run podman.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Ungrateful tasks that need done but that nobody wants to do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant