SKOPEO-INSPECT(1)

πŸ’… skopeo-inspect(1) β€” like, the whole manual, bestie

okay so welcome to skopeo-inspect, straight out of the skopeo(1) manual family ✨ this page is literally your VIP pass to peeking at what's inside an image before you commit to pulling it. no cap, it's giving detective energy πŸ”


🌸 NAME 🌸

skopeo-inspect β€” returns low-level info about image-name in a registry. that's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

skopeo inspect [options] image-name

✨ DESCRIPTION ✨

so like, this returns low-level information about image-name in a registry. for what even counts as an image-name, go check skopeo(1) β€” it's all laid out there 🫢

the default output is a whole lil collage of data from different sources, and honestly it's iconic:

  • user input β†’ Name
  • the remote repository, if there is one β†’ RepoTags
  • the top-level manifest β†’ Digest
  • a per-architecture/OS image matching your current run-time environment β†’ most other values

and if you're like "ok but I wanna see values for a different architecture/OS", bestie there's --override-os / --override-arch over in skopeo(1). go off πŸ‘‘


πŸ’– OPTIONS πŸ’–

also quick heads-up: check skopeo(1) for options you put before the subcommand name. those exist. iykyk πŸ’…

  • --authfile path β€” path of the primary registry credentials file. on Linux the default is ${XDG_RUNTIME_DIR}/containers/auth.json. for the full tea on the credential search mechanism and what the defaults are on other platforms, see containers-auth.json(5). and yeah β€” use skopeo login to manage those credentials, don't be feral about it πŸ™ˆ
  • --cert-dir path β€” use the certificates at path (*.crt, *.cert, *.key) to connect to the registry πŸ”
  • --config β€” output the configuration in OCI format. the default is to format in JSON format. (yes, that's the whole difference, slay)
  • --creds username[:password] β€” username and password for accessing the registry
  • --daemon-host host β€” use the docker daemon host at host. note: docker-daemon: transport only, so like… only there 🫑
  • --format, -f=format β€” format the output using the given Go template. the keys of the returned JSON can be used as the values for the --format flag (examples are down below, go look πŸ‘€). it supports the Go templating functions available at https://pkg.go.dev/github.com/containers/common/pkg/report#hdr-Template_Functions
  • --help, -h β€” print usage statement
  • --no-creds β€” access the registry anonymously. incognito mode fr fr πŸ•ΆοΈ
  • --raw β€” output raw manifest or config data depending on the --config option. and listen: the --format option is not supported with the --raw option. pick a lane bestie πŸ’€
  • --registry-token Bearer token β€” registry token for accessing the registry
  • --retry-times β€” the number of times to retry. by default, no retries are attempted. zero. none. raw dogging the network 😭
  • --retry-delay β€” fixed delay between retries. if it's not set (or set to 0s), the retry wait time will be exponentially increased based on the number of failed attempts. it's giving exponential backoff ✨
  • --shared-blob-dir directory β€” directory to use to share blobs across OCI repositories
  • --tls-verify=bool β€” require HTTPS and verify certificates when talking to the container registry or daemon. defaults to the registry.conf setting πŸ”’
  • --username β€” the username to access the registry
  • --password β€” the password to access the registry
  • --no-tags, -n β€” do not list the available tags from the repository in the output. when true, the RepoTags array will be empty. defaults to false, which includes all available tags 🏷️
  • --manifest-digest=algorithm EXPERIMENTAL β€” algorithm to use for computing the manifest digest (sha256, sha512); defaults to the algorithm used in the config digest
⚠️ real talk: --manifest-digest is experimental and its behavior may change in future releases. don't build your whole personality on it, bestie πŸ™ˆ

πŸ”₯ EXAMPLES πŸ”₯

πŸ“ reviewing info for the image fedora from the docker.io registry

$ skopeo inspect docker://docker.io/fedora

and it gives you:

{
    "Name": "docker.io/library/fedora",
    "Digest": "sha256:f99efcddc4dd6736d8a88cc1ab6722098ec1d77dbf7aed9a7a514fc997ca08e0",
    "RepoTags": [
        "20",
        "21",
        "..."
    ],
    "Created": "2022-11-16T07:26:42.618327645Z",
    "DockerVersion": "20.10.12",
    "Labels": {
        "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:cb8b1ed77979b894115a983f391465651aa7eb3edd036be4b508eea47271eb93"
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "Digest": "sha256:cb8b1ed77979b894115a983f391465651aa7eb3edd036be4b508eea47271eb93",
            "Size": 65990920,
            "Annotations": null
        }
    ],
    "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "DISTTAG=f37container",
        "FGC=f37",
        "FBR=f37"
    ]
}

🧚 inspecting python from the docker.io registry and not showing the available tags

$ skopeo inspect --no-tags docker://docker.io/library/python
{
    "Name": "docker.io/library/python",
    "Digest": "sha256:10fc14aa6ae69f69e4c953cffd9b0964843d8c163950491d2138af891377bc1d",
    "RepoTags": [],
    "Created": "2022-11-16T06:55:28.566254104Z",
    "DockerVersion": "20.10.12",
    "Labels": null,
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:a8ca11554fce00d9177da2d76307bdc06df7faeb84529755c648ac4886192ed1",
        "sha256:e4e46864aba2e62ba7c75965e4aa33ec856ee1b1074dda6b478101c577b63abd",
        "..."
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "Digest": "sha256:a8ca11554fce00d9177da2d76307bdc06df7faeb84529755c648ac4886192ed1",
            "Size": 55038615,
            "Annotations": null
        },
        {
            "MIMEType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "Digest": "sha256:e4e46864aba2e62ba7c75965e4aa33ec856ee1b1074dda6b478101c577b63abd",
            "Size": 5164893,
            "Annotations": null
        },
        "..."
    ],
    "Env": [
        "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "LANG=C.UTF-8",
        "...",
    ]
}

see that "RepoTags": []? empty. because --no-tags. we love a clean slate ✨

πŸŽ€ formatting with a Go template

$ /bin/skopeo inspect --config docker://registry.fedoraproject.org/fedora --format "{{ .Architecture }}"
amd64

and another one, because we're extra:

$ /bin/skopeo inspect --format '{{ .Env }}' docker://registry.access.redhat.com/ubi8
[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci]

πŸ‘‘ getting the digest using a specific algorithm

$ skopeo inspect --manifest-digest=sha512 docker://docker.io/library/alpine:latest --format "Digest: {{.Digest}}"
Digest: sha512:5acb33fb56a7791bf0c69d5b19a1c70272148e4107be5261d57305d14e9509792bbca53e5277c456181ecfa1c20ad8427f9b8ba46868020584a819de1128dbd2

sha512 said "let me cook" and cooked πŸ”₯


🌈 SEE ALSO 🌈

skopeo(1), skopeo-login(1), docker-login(1), containers-auth.json(5)


πŸ’œ AUTHORS πŸ’œ

  • Antonio Murdaca runcom@redhat.com ⟨mailto:runcom@redhat.com⟩
  • Miloslav Trmac mitr@redhat.com ⟨mailto:mitr@redhat.com⟩
  • Jhon Honce jhonce@redhat.com ⟨mailto:jhonce@redhat.com⟩

these three literally built the thing. legends only 🫢


aaaand that's the page!! πŸ¦‹ it lives in the skopeo-inspect(1) slot of the skopeo manual β€” same source family as skopeo(1), and it's the one you just read, top to bottom. go inspect something iconic, bestie. periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from