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

Modify create-package to bundle dependencies in a multi-arch offline image #326

Open
dmikusa opened this issue Apr 10, 2024 · 0 comments
Open
Labels
type:bug A general bug

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Apr 10, 2024

Expected Behavior

When you run create-package there is the --include-dependencies option which downloads and caches all of the deps into the resulting image. This presently assumes there's one image. With the introduction of multi-arch images, the behavior needs to change to support that.

Possible Solution

  1. Download all of the images.
  2. Bundle only dependencies specific to a particular architecture of the image of that architecture.

For example, the folder structure for multi-arch is linux/<arch>/... so it would make linux/amd64/dependencies and linux/arm64/dependencies and put the images specific to each architecture in those directories.

In libpak, we call cache.Artifact for each artifact, but the cache controls where the files are written so this will likely require setting up two separate caches and then calling the correct cache per artifact (based on its type), or modifying the cache itself to be architecture aware. If the cache itself stored files under sub folders with the architecture name, then you could easily move parts of the cache into the linux/<arch>/dependencies directory after caching everything.

I do think that we should wait on this until we switch to using the arch metadata field in libpak.

Motivations

Multi-arch support.

@dmikusa dmikusa added the type:bug A general bug label Apr 10, 2024
@dmikusa dmikusa mentioned this issue Apr 16, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant