containers / skopeo

Work with remote images registries - retrieving information, images, signing content
Apache License 2.0
7.83k stars 758 forks source link

FATA[0002] no image found in manifest list for architecture amd64, OS darwin #634

Closed developer-guy closed 5 years ago

developer-guy commented 5 years ago

skopeo inspect docker://docker.io/fedora:rawhide --> i tried this command and an error which is name of issue got occurred.

vrothberg commented 5 years ago

Hi @developer-guy , thanks for reaching out!

FATA[0002] no image found in manifest list for architecture amd64, OS darwin

Are you executing skopeo on Mac OS? As Fedora only supports Linux, the error looks correct to me as multi-arch manifests will be selected based on the host's platform.

You can use the --raw flag to list the platform-specific manifests and use the digest notation to inspect the manifest you're looking for, e.g.:

$ skopeo inspect --raw docker://docker.io/fedora:rawhide
{                                                                                            
   "schemaVersion": 2,                                                                       
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",                 
   "manifests": [                                                                            
      {                                                                                      
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",                
         "size": 529,                                                                        
         "digest": "sha256:e5f8c40f18eec96a837f4ef58b9df80be67bd5733af13c15b910757ecfd77d64",
         "platform": {                                                                       
            "architecture": "amd64",                                                         
            "os": "linux"                                                                    
         }                                                                                   
      },                                                                                     
[...]
}

$ skopeo inspect  docker://docker.io/fedora@sha256:e5f8c40f18eec96a837f4ef58b9df80be67bd5733af13c15b910757ecfd77d64
{
    "Name": "docker.io/library/fedora",
    "Digest": "sha256:e5f8c40f18eec96a837f4ef58b9df80be67bd5733af13c15b910757ecfd77d64",
    "RepoTags": [
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26-modular",
        "26",
        "27",
        "28",
        "29",
        "30",
        "31",
        "branched",
        "heisenbug",
        "latest",
        "modular",
        "rawhide"
    ],
    "Created": "2019-04-03T22:21:11.324232618Z",
    "DockerVersion": "18.06.1-ce",
    "Labels": {
        "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:32b2bee0e79bc7112b4fd8def6a57ff2c04bacd4df1352be492f5aeba89deb61"
    ]
}
developer-guy commented 5 years ago

thank you for your quick response, it works @vrothberg 👍

mtrmac commented 5 years ago

Maybe more practically, skopeo --override-os linux … will work with the Linux version of the image, without otherwise affecting the semantics; e.g. skopeo --override-os linux copy … copies the Linux image just like running skopeo on Linux would..

cmoulliard commented 5 years ago

since latest version of skopeo, adding the parameter --raw don't resolve the problem anymore on MacOS

VERSION:
   0.1.37-dev commit: b1377413855cfe601d83c8c653ce6b629e41fb98

 ./skopeo inspect --raw --creds username:pwd docker://registry.redhat.io/openjdk/openjdk-8-rhel8
FATA[0002] no image found in manifest list for architecture amd64, OS darwin

And using --override-os generates a very strange result

./skopeo inspect --override-os linux --creds user:pwd docker://registry.redhat.io/openjdk/openjdk-8-rhel8
Incorrect Usage: flag provided but not defined: -override-os

NAME:
   skopeo inspect - Inspect image IMAGE-NAME

USAGE:
   skopeo inspect [command options] IMAGE-NAME

DESCRIPTION:

  Return low-level information about "IMAGE-NAME" in a registry/transport

  Supported transports:
  containers-storage, dir, docker, docker-archive, docker-daemon, oci, oci-archive, ostree, tarball

  See skopeo(1) section "IMAGE NAMES" for the expected format

OPTIONS:
   --raw                        output raw manifest or configuration
   --config                     output configuration
   --authfile value             path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json
   --creds USERNAME[:PASSWORD]  Use USERNAME[:PASSWORD] for accessing the registry
   --cert-dir PATH              use certificates at PATH (*.crt, *.cert, *.key) to connect to the registry or daemon
   --tls-verify value           require HTTPS and verify certificates when talking to the container registry or daemon (defaults to true)
   --shared-blob-dir DIRECTORY  DIRECTORY to use to share blobs across OCI repositories
   --daemon-host HOST           use docker daemon host at HOST (docker-daemon: only)
   --no-creds                   Access the registry anonymously

FATA[0000] flag provided but not defined: -override-os
mtrmac commented 5 years ago

since latest version of skopeo, adding the parameter --raw don't resolve the problem anymore on MacOS

VERSION:
   0.1.37-dev commit: b1377413855cfe601d83c8c653ce6b629e41fb98

 ./skopeo inspect --raw --creds username:pwd docker://registry.redhat.io/openjdk/openjdk-8-rhel8
FATA[0002] no image found in manifest list for architecture amd64, OS darwin

Hum, did it ever work on macOS for Linux Images? AFAICS --raw never turned off parsing of the image and the like, it only affected the output. (I realize that a comment above recommends --raw, so I might have missed something.)

And using --override-os generates a very strange result

./skopeo inspect --override-os linux --creds user:pwd docker://registry.redhat.io/openjdk/openjdk-8-rhel8
Incorrect Usage: flag provided but not defined: -override-os

--override-os is a global option, so, skopeo --override-os linux inspect ….

cmoulliard commented 5 years ago

global option

Great to know. That works ! Many thanks

ripper2hl commented 11 months ago

On mac M1

skopeo copy docker://registry.access.redhat.com/ubi8/openjdk-11:1.16-3 docker://docker-registry-some-place/openshift/ubi8-openjdk-11:latest --override-os linux --override-arch amd64