Skip to content

Commit

Permalink
Merge pull request #27 from redhat-scholars/image-management
Browse files Browse the repository at this point in the history
Add image help command
  • Loading branch information
kdubois authored May 23, 2024
2 parents ba8b372 + 307046e commit 8dc96ea
Showing 1 changed file with 59 additions and 10 deletions.
69 changes: 59 additions & 10 deletions documentation/modules/ROOT/pages/imagemanagement.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 :)

0 comments on commit 8dc96ea

Please sign in to comment.