Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 馃悰 build fail Failed to Load Docker Image Metadata #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EduarteXD
Copy link

Please see replicate/cog#1656

@@ -25,6 +25,8 @@ runs:
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
with:
use: 'false'
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member

Choose a reason for hiding this comment

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

@EduarteXD I see this:

https://github.com/docker/setup-buildx-action/blob/5138f76647652447004da686b2411557eaf65f33/README.md#L97

Screenshot 2024-05-21 at 09 22 43@2x

.. but I don't know enough about how Docker or buildx works to know what "Switch to this builder instance" means or what effect it might have.

Copy link
Author

Choose a reason for hiding this comment

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

In buildx, the --use parameter is used to specify an existing builder.

In the setup-buildx-action script, passing use: true will make each build step use a new builder instance, each builder has its own context, cache, and storage space.

Therefore, the artifacts (such as intermediate layer cache, final images, etc.) between different builders are isolated by default and cannot directly access each other鈥檚 artifacts.

In each step of the cog's build, it is necessary to use --load to directly load the built image into the Docker engine, which can take a considerable amount of time.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha! Thanks for explaining in detail. I can set up a test workflow that combines this change plus replicate/cog#1656 and see how it goes. If everything is smooth I'll merge and ship these changes.

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.

None yet

2 participants