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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement baking #849

Closed
wants to merge 6 commits into from
Closed

implement baking #849

wants to merge 6 commits into from

Conversation

Emilgardis
Copy link
Member

@Emilgardis Emilgardis commented Jun 24, 2022

No description provided.

@Emilgardis
Copy link
Member Author

Emilgardis commented Jul 28, 2022

with this comes a question, should we tag all these even if they will eventually come up in a manifest?

Reason for including this is to enable easier cleanup, as right now the images that are in the manifest will be untagged.

I think it's fine to tag them, I'm just not sure how to tag them. Maybe <tag>-<arch> ?

Example of how it looks:
image
image

https://github.com/Emilgardis/cross/pkgs/container/s390x-unknown-linux-gnu/versions

reason for tagging would be to show what digest corresponds to what version, and which one is the most "newest" one.

@Emilgardis
Copy link
Member Author

Note also, there's a bug on ghcr where they suggest adding a LABEL to the manifest, this is impossible to do:
image

both images in the manifest do have descriptions

image

@Emilgardis
Copy link
Member Author

The proposed workflow for a multi platform image would be

  1. build the image(s) as normal, separately, specify platform if needed. make sure they are on the same builder as bake would use
  2. test
  3. on need to push, use --bake and specify

} else {
docker_bake.args(&["--set", "*.output=type=registry"]);
}
//docker_bake.args(&["--set", "*.cache-to=type=inline"]);
Copy link
Member Author

Choose a reason for hiding this comment

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

this should not be commented

this also enables appending to a manifest, which would enable doing sequential or even separate builds of images to the same manifest
@Emilgardis Emilgardis marked this pull request as draft August 8, 2022 18:55
@Emilgardis
Copy link
Member Author

Emilgardis commented Aug 8, 2022

marking as draft again, this is ready for use though, there is something I'm not liking about the naming though.

The issue is that for proper/good caching, we need unique tags for each architecture, otherwise the cache will use the most "upper" image in the manifest.

I think

<target>:<version>-<arch> makes sense, but it is a bit confusing.

x86_64-unknown-linux-gnu:main-aarch64 for example

@Emilgardis
Copy link
Member Author

closing this, the code has diverged to much and I want to reimplement this.

The idea would be to append -{arch}, and then assemble into a manifest, I don't think using bake is needed. Instead we use a normal build, publish for the different archs, and create a manifest with the images of all the architectures

@Emilgardis Emilgardis closed this Nov 5, 2022
@Alexhuszagh Alexhuszagh added the meta issues/PRs related to the maintenance of the crate. label Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta issues/PRs related to the maintenance of the crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants