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

[containers/podman] podman build adds "variant" to all images when building multiarch images on MacOS (Apple Silicon)

XMLWordPrintable

    • 3
    • False
    • None
    • False
    • rhel-sst-container-tools

      [2301221809] Upstream Reporter: David Elie-Dit-Cosaque
      Upstream issue status: Closed
      Upstream description:

      Issue Description

      Describe your issue Running `docker build --platform='linux/arm64,linux/amd64' on MacOS ARM (MAC M series processor) to generate multi architecture images for linux/amd64 introduces a variant from the ARM architecture (v8) in the docker manifest for all target architectures, including intel which does not define variants.

      Steps to reproduce the issue

      Steps to reproduce the issue

      1. podman buildx build --platform=linux/arm64,linux/amd64,linux/s390x,linux/ppc64le --manifest <image_name> -f Dockerfile .
      2. doker manifest push <image_name>
      3. skopeo inspect --raw docker://<image_name>
      4. or podman pull <image_name>

      Describe the results you received

      Describe the results you received

      1. with Skopeo, the intel image, which should not have a variant has one:
          {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "digest": "sha256:d8436858705389ce630788009....141ebbab6a6f09839cf9",
            "size": 2311,
            "platform": {
              "architecture": "amd64",
              "os": "linux",
              "variant": "v8"
            }
          }
      1. the docker pull fails with this error:
      podman pull <image_name>
      Trying to pull <image_name>...
      Error: choosing an image from manifest list docker://<image_name>: no image found in image index for architecture amd64, variant "", OS linux

      Describe the results you expected

      Describe the results you expected

      1. with Skopeo, the intel image platform should have no variant in manifest
          {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "digest": "sha256:d8436858705389ce630788009....141ebbab6a6f09839cf9",
            "size": 2311,
            "platform": {
              "architecture": "amd64",
              "os": "linux",
            }
          }
      1. the docker pull the image with no error when running on intel architecture podman pull <image_name>

      podman info output

      If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.
      

      Podman in a container

      No

      Privileged Or Rootless

      Rootless

      Upstream Latest Release

      Yes

      Additional environment details

      Additional environment details

      Additional information

      Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting


      Upstream URL: https://github.com/containers/podman/issues/22730

              rhn-engineering-nalin Nalin Dahyabhai
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: