Skip to content

fix: Always pass --load during docker build #2335

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danfairs
Copy link
Contributor

@danfairs danfairs commented May 15, 2025

This change modifies Cog so that it always passes --load during docker build.

Previously, it would only pass this flag if running on Apple Silicon. I don't think that is quite the right check - it is actually down to the build driver in use. Cog seems to assume that the image will always be loaded into Docker, so unconditionally passing --load seems to be the right thing to do.

I had to include this change to allow builds to complete successfully on a self-hosted Linux GH CI runner.

I have included tests for the new behaviour, plus some coverage of existing behaviours with different ImageBuildOption settings in place.

Fixes #2329.

danfairs added 2 commits May 14, 2025 15:15
The requirement for —load isn’t just gated by OS/arch - it’s determined by the build driver.

Signed-off-by: Dan Fairs <[email protected]>
Seems safer to just use docker’s default

Signed-off-by: Dan Fairs <[email protected]>
@danfairs danfairs marked this pull request as ready for review May 15, 2025 08:26
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.

Cog does not always load image into docker after build
1 participant