From 307046ecb3883c7b2b4e28fb44d2985174372105 Mon Sep 17 00:00:00 2001 From: Kevin Dubois Date: Thu, 23 May 2024 10:23:30 +0200 Subject: [PATCH] Add image help command --- .../modules/ROOT/pages/imagemanagement.adoc | 69 ++++++++++++++++--- 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/documentation/modules/ROOT/pages/imagemanagement.adoc b/documentation/modules/ROOT/pages/imagemanagement.adoc index cf1aa5a..1b2776a 100644 --- a/documentation/modules/ROOT/pages/imagemanagement.adoc +++ b/documentation/modules/ROOT/pages/imagemanagement.adoc @@ -66,16 +66,6 @@ registry.access.redhat.com/ubi9/openjdk-21-runtime 1.18-4 80786be7434f Your image is the `my-image` and the `registry.access.redhat.com/ubi9/openjdk-21` is the image used to build yours. -== Removing images - -To remove your just created image: - -[.console-input] -[source,bash,subs="+macros,+attributes"] ----- -docker image rm my-image ----- - == Exploring the Desktop interface Let's take a look at image management in the Desktop interfaces. @@ -90,3 +80,62 @@ image::podman-desktop-images.png[alt="Podman Desktop Images tab", align="center" We can see information about the image layers, and low-level information about the image in JSON format. image::podman-desktop-image-info.png[alt="Podman Desktop Image Info tab", align="center"] + + +For now though, let's stick to the terminal and get a little more comfortable with the command line instructions. + +== Managing images + +The Podman or Docker CLI offer many ways to manage container images. You can find out more by issuing the following help command: + +[.console-input] +[source,bash,subs="+macros,+attributes"] +---- +docker image -h +---- + +[.console-output] +[source,text] +---- +Manage images + +Description: + Manage images + +Usage: + podman image [command] + +Available Commands: + build Build an image using instructions from Containerfiles + diff Inspect changes to the image's file systems + exists Check if an image exists in local storage + history Show history of a specified image + import Import a tarball to create a filesystem image + inspect Display the configuration of an image + list List images in local storage + load Load image(s) from a tar archive + mount Mount an image's root filesystem + prune Remove unused images + pull Pull an image from a registry + push Push an image to a specified destination + rm Remove one or more images from local storage + save Save image(s) to an archive + scp Securely copy images + search Search registry for image + sign Sign an image + tag Add an additional name to a local image + tree Print layer hierarchy of an image in a tree format + trust Manage container image trust policy + unmount Unmount an image's root filesystem + untag Remove a name from a local image +---- + +Let's try to remove your just created image: + +[.console-input] +[source,bash,subs="+macros,+attributes"] +---- +docker image rm my-image +---- + +Great! You're well on your way to becoming a Container Image expert :)