Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container: Add manifest/config to image query, add image history CLI #272

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

cgwalters
Copy link
Member

Extend our image state struct to include the manifest and image
configuration (if available, only in v1).

Add a container image history CLI verb which prints it.

@cgwalters
Copy link
Member Author

Demo:

[root@cosa-devsh ~]# ostree-ext-cli container image history --repo=/ostree/repo ostree-unverified-registry:quay.io/cgwalters/fcos-chunked
ID                    SIZE        CREATED BY
sha256:a164efe876bf8  201.9 MB   linux-firmware-20220310-130.fc35.noarch
sha256:0cbc19db8d0f4  162.4 MB   moby-engine-20.10.12-1.fc35.x86_64
sha256:4a7b79c2b8571  158.2 MB   containerd-1.6.1-1.fc35.x86_64
sha256:6e3b375ba3657  84.7 MB    initramfs (kernel 5.16.16-200.fc35.x86_64)
sha256:d1e9b2cf628ab  62.9 MB    containernetworking-plugins-1.1.0-1.fc35.x86_64
sha256:4707e434f3028  60.7 MB    rpmostree-unpackaged-content
sha256:700dc81a3266e  58.7 MB    kernel-modules-5.16.16-200.fc35.x86_64
sha256:ecca19430407b  57.8 MB    kernel-core-5.16.16-200.fc35.x86_64
sha256:013e69ee80305  50.2 MB    podman-3:3.4.4-1.fc35.x86_64
sha256:c77479a1b7581  34.7 MB    libicu-69.1-2.fc35.x86_64
sha256:c6ed6f06649ec  29.2 MB    mozjs78-78.15.0-1.fc35.x86_64
sha256:ba7648b948639  26.4 MB    skopeo-1:1.6.0-1.fc35.x86_64
sha256:d9585b9bfda88  23.2 MB    ignition-2.13.0-5.fc35.x86_64
sha256:cfc51a11e75c9  23.2 MB    samba-client-libs-2:4.15.6-0.fc35.x86_64
sha256:daad6b903f9e8  18.9 MB    git-core-2.35.1-1.fc35.x86_64
sha256:36b1fa22502fd  13.5 MB    glib2-2.70.5-1.fc35.x86_64
sha256:34cb46b1c79fb  12.6 MB    runc-2:1.1.0-1.fc35.x86_64
sha256:2493da7bc1268  13.2 MB    systemd-249.9-1.fc35.x86_64
sha256:66d14fddfa177  11.8 MB    rpm-ostree-2022.5-1.fc35.x86_64
sha256:db7050e1255d4  11.7 MB    util-linux-2.37.4-1.fc35.x86_64
sha256:525e455c58cb5  10.3 MB    coreos-installer-0.13.1-1.fc35.x86_64
sha256:1097375835349  10.3 MB    podman-plugins-3:3.4.4-1.fc35.x86_64
sha256:f0b0d3cf1930e  10.3 MB    coreutils-common-8.32-32.fc35.x86_64
sha256:555af666c960d  10.9 MB    systemd-udev-249.9-1.fc35.x86_64
sha256:ee5e19d137f4e  9.6 MB     NetworkManager-libnm-1:1.32.12-2.fc35.x86_64
sha256:197103743ea36  9.0 MB     gnupg2-2.3.4-1.fc35.x86_64
sha256:09a48fcb40d71  8.6 MB     file-libs-5.40-9.fc35.x86_64
sha256:f19041e03b12c  8.6 MB     grub2-tools-1:2.06-10.fc35.x86_64
sha256:ce0d0d003db14  8.3 MB     toolbox-0.0.99.3-2.fc35.x86_64
sha256:86921b646d1eb  8.6 MB     fwupd-1.7.6-1.fc35.x86_64
sha256:df9cc70fbdd4c  6.9 MB     NetworkManager-1:1.32.12-2.fc35.x86_64
sha256:041d41fcd75bb  6.5 MB     zincati-0.0.24-1.fc35.x86_64
sha256:bd16b4dac9f26  6.5 MB     bash-5.1.8-2.fc35.x86_64
sha256:3eb4d5c6314c4  6.5 MB     glibc-2.34-29.fc35.x86_64
sha256:464644b2a4b05  6.8 MB     coreutils-8.32-32.fc35.x86_64
sha256:b70b9d35bffce  5.7 MB     sssd-common-2.6.3-1.fc35.x86_64
sha256:8db305f795294  5.3 MB     afterburn-5.2.0-4.fc35.x86_64
sha256:40eb449d1973a  7.6 MB     shared-mime-info-2.1-3.fc35.x86_64
sha256:279a6db942612  5.2 MB     btrfs-progs-5.16.2-1.fc35.x86_64
sha256:da162145e9074  5.5 MB     gettext-0.21-8.fc35.x86_64
sha256:90972821dda71  5.2 MB     microcode_ctl-2:2.1-47.1.fc35.x86_64
sha256:a07271cd0a9c7  4.9 MB     grub2-common-1:2.06-10.fc35.noarch
sha256:020b193a361f7  4.8 MB     systemd-libs-249.9-1.fc35.x86_64 and systemd-libs-249.9-1.fc35.x86_64 and systemd-container-249.9-1.fc35.x86_64 and systemd-pam-249.9-1.fc35.x86_64 and systemd-resolved-24
sha256:2531053d8c057  4.7 MB     e2fsprogs-1.46.3-1.fc35.x86_64
sha256:74fcb628ff789  4.4 MB     sudo-1.9.7p2-2.fc35.x86_64
sha256:27627f5319100  4.2 MB     openssh-clients-8.7p1-3.fc35.x86_64 and openssh-clients-8.7p1-3.fc35.x86_64 and openssh-server-8.7p1-3.fc35.x86_64 and openssh-8.7p1-3.fc35.x86_64
sha256:ca4d06abcea74  4.0 MB     openssl-libs-1:1.1.1n-1.fc35.x86_64
sha256:5f240b350f43f  3.8 MB     bind-libs-32:9.16.27-1.fc35.x86_64
sha256:93356de843062  3.5 MB     xfsprogs-5.12.0-2.fc35.x86_64
sha256:8ba4083eaa689  3.4 MB     grub2-tools-minimal-1:2.06-10.fc35.x86_64
sha256:643bd3d4e94ed  3.4 MB     lvm2-2.03.11-6.fc35.x86_64
sha256:7f257a5735d6f  3.6 MB     shadow-utils-2:4.9-9.fc35.x86_64
sha256:22f20dacac5e6  4.1 MB     grub2-pc-modules-1:2.06-10.fc35.noarch
sha256:c403c4b65fddf  3.4 MB     rpm-4.17.0-4.fc35.x86_64 and rpm-4.17.0-4.fc35.x86_64 and rpm-libs-4.17.0-4.fc35.x86_64 and rpm-plugin-selinux-4.17.0-4.fc35.x86_64
sha256:5f93c969758bf  2.9 MB     device-mapper-persistent-data-0.9.0-6.fc35.x86_64
sha256:ee9a09b23dd99  3.0 MB     tar-2:1.34-2.fc35.x86_64
sha256:4b2a761bbb42e  2.9 MB     gnutls-3.7.2-3.fc35.x86_64
sha256:d8ec8823e69d1  2.8 MB     lvm2-libs-2.03.11-6.fc35.x86_64
sha256:913f53873c8a0  3.6 MB     iptables-libs-1.8.7-13.fc35.x86_64 and iptables-libs-1.8.7-13.fc35.x86_64 and iptables-nft-1.8.7-13.fc35.x86_64 and iptables-legacy-1.8.7-13.fc35.x86_64 and iptables-legac
sha256:a8745ee2f68f9  2.9 MB     iproute-5.13.0-2.fc35.x86_64 and iproute-5.13.0-2.fc35.x86_64 and iproute-tc-5.13.0-2.fc35.x86_64
sha256:c4b11bbcb10ef  2.7 MB     libstdc++-11.2.1-9.fc35.x86_64
sha256:539fcc7ed765e  2.6 MB     bootupd-0.2.6-1.fc35.x86_64
sha256:505ac61f472d9  2.6 MB     coreos-installer-bootinfra-0.13.1-1.fc35.x86_64
sha256:77d353f2444f1  138.0 MB   314 components
sha256:eb75dca12efe7  7.2 MB     ostree export of commit d8e45d90ad398901a3c8f8d952c21d1c6a411d5bea8048942866fac3f7a66246
[root@cosa-devsh ~]# 

Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cgwalters
Copy link
Member Author

githubstatus.com says green, but...no actions

@cgwalters cgwalters closed this Mar 25, 2022
@cgwalters cgwalters reopened this Mar 25, 2022
Extend our image state struct to include the manifest and image
configuration (if available, only in v1).

Add a `container image history` CLI verb which prints it.
Adding the manifest and config directly to the struct greatly
inflates the size of one enum variant as clippy points out.

Let's `Box` this to avoid putting ~1k bytes on the stack.
@jmarrero jmarrero merged commit 9817575 into ostreedev:main Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants