Uploaded image for project: 'Container Tools'
  1. Container Tools
  2. RUN-2683

[containers/buildah] FROM --platform=<os/arch> Containerfile construct picks the wrong platform with image index

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • buildah
    • False
    • Hide

      None

      Show
      None
    • False
    • rhel-container-tools

      [2953712464] Upstream Reporter: Sergey Yedrikov
      Upstream issue status: Open
      Upstream description:

      Containerfile:

      FROM --platform=linux/amd64 ${BASE_IMAGE} as base_image

      When building an image with the above fragment of Containerfile on linux/aarch64, it appears that if BASE_IMAGE refers to an image index, FROM --platform=linux/amd64 fails to look for the linux/amd64 image and instead looks for the platform the build is running on, linux/aarch64.

      The build running on linux/aarch64 fails with the following error message:

      Trying to pull quay.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/own-app-lightspeed-rag-content@sha256:3bff77ee31f1c1ac0351bef86809c0aeef58626779941d14e08fe21bc62816eb...
      Error: choosing an image from manifest list docker://quay.io/redhat-user-workloads/crt-nshift-lightspeed-tenant/own-app-lightspeed-rag-content@sha256:3bff77ee31f1c1ac0351bef86809c0aeef58626779941d14e08fe21bc62816eb: no image found in image index for architecture "arm64", variant "v8", OS "linux"

      If, on the other hand, BASE_IMAGE refers directly to an image, --platform=linux/amd64 is honored.


      Upstream URL: https://github.com/containers/buildah/issues/6091

              container-runtime-eng Container Runtime Eng Bot
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: