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 multi-arch image building for devfile-index & devfile-index-base #1547

Closed
5 tasks done
Tracked by #1608
Jdubrick opened this issue May 13, 2024 · 0 comments · Fixed by devfile/registry-support#244, devfile/registry-support#245 or devfile/registry#414
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure

Comments

@Jdubrick
Copy link
Contributor

Jdubrick commented May 13, 2024

Which area is this issue related to?

/area registry

Issue Description

Currently when trying build devfile-index-base and devfile-index with --platform linux/arm64 you are presented with:

WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64)

This is most likely due to the base builder image not supporting arm64. Newer versions of that builder should support it.

The Dockerfile used to build devfile-index also contains amd64 dependencies. This will cause the image to build for amd64 even if --platform linux/arm64 is passed on most machines that won't fully emulate (I believe the newest version of Podman is doing this). This will need to be dynamically set based on the architecture the build is trying to run for.

Additionally, we should implement manifest creation so that we can build and store the images as multi-arch so that both architectures are supported. It may also be good to implement the manifest creation, multi-arch building, and pushing to the existing build.sh, push.sh and build_registry.sh scripts we are already using.

Once the manifest is created and apart of the repository, any automation that is currently building images for this repository and pushing them should be doing so to the manifest to allow for multi-arch pulling.

Below is an example from Red Hat Developer:

# First, initialise the manifest
podman manifest create <image name>

# Build the image attaching them to the manifest
podman build --platform linux/amd64,linux/arm64  --manifest <image name>  .

# Finally publish the manifest
podman manifest push <image name>

Acceptance criteria

  • Warnings about base image not supporting arm64 architecture cleared
  • amd64 dependency in Dockerfile handled to dynamically set
  • devfile-index-base able to be built as multi-arch
  • devfile-index able to be built as multi-arch
  • Any automations building images and pushing to quay.io should be pushing to that manifest
@openshift-ci openshift-ci bot added the area/registry Devfile registry for stacks and infrastructure label May 13, 2024
@Jdubrick Jdubrick moved this to Refinement in Devfile Project May 13, 2024
@Jdubrick Jdubrick moved this from Refinement to Backlog in Devfile Project May 15, 2024
@Jdubrick Jdubrick self-assigned this May 29, 2024
@Jdubrick Jdubrick moved this from Backlog to To Do 📝 in Devfile Project May 29, 2024
@Jdubrick Jdubrick moved this from To Do 📝 to In Progress 🚧 in Devfile Project May 29, 2024
@github-project-automation github-project-automation bot moved this from In Progress 🚧 to Done ✅ in Devfile Project May 30, 2024
@Jdubrick Jdubrick reopened this May 30, 2024
@Jdubrick Jdubrick moved this from Done ✅ to In Progress 🚧 in Devfile Project May 30, 2024
@Jdubrick Jdubrick moved this from In Progress 🚧 to In Review 👀 in Devfile Project Jun 3, 2024
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in Devfile Project Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure
Projects
Status: Done ✅
1 participant