mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

335K
active users

#skopeo

0 posts0 participants0 posts today
Replied in thread

@alxlg your most welcome!

I by no means only use #docker. Far from it. 😎 But it does have a lot of capabilities now. Very much thanks to the outstanding work done on #podman and #buildah.

Heck, yesterday a colleague found out "they" copied #skopeo for image mirroring with "imagetools". The cli design is really noisy, but it does work. 😅

docs.docker.com/reference/cli/

Docker Documentation · "docker buildx imagetools create"""

Skopeo can also inspect the configuration of a container, not just what's in the OCI manifest. It's great to get a handle on the default environment variables, working directory, and other defaults. Use the --config flag to get the configuration of an image as a big JSON file.

skopeo inspect --config --override-os="linux" --override-arch="amd64" docker://python:3.12

I also needed to specify the OS and CPU architecture I wanted to inspect. Skopeo defaults to what's detected on the host and I'm on an ARM-based Mac. This returns something that's easy to pipe through JQ for just what I need - in this case, the default environment variables of the Python:3.12 image for Intel-based Linux systems.

ᐅ skopeo inspect  --config --override-os="linux" --override-arch="amd64" docker://python:3.12 | jq '.config.Env'
[
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305",
"PYTHON_VERSION=3.12.7",
"PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550"
]
Work with remote images registries - retrieving information, images, signing content - containers/skopeo
GitHubGitHub - containers/skopeo: Work with remote images registries - retrieving information, images, signing contentWork with remote images registries - retrieving information, images, signing content - containers/skopeo

Want to know how big an image is going to be *before* you download it? You can do this with #skopeo and a bit of #bash.

skopeo inspect docker://alpine/openssl:latest | jq '.LayersData[].Size' | paste -s -d+ - | bc | numfmt --to=iec-i --suffix=B

3.6MiB

skopeo inspect docker://ucsb/pstat-134-234:v20231107 | jq '.LayersData[].Size' | paste -s -d+ - | bc | numfmt --to=iec-i --suffix=B

7.6GiB