Fix up example description of podman-image commands

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2024-02-17 13:36:24 -05:00
parent fbb4d5dca6
commit 777b258a7a
9 changed files with 45 additions and 41 deletions

View File

@ -25,16 +25,18 @@ Alter the output into a different format. The only valid format for **podman im
## EXAMPLE ## EXAMPLE
Display image differences from images parent layer:
``` ```
$ podman diff redis:old $ podman image diff redis:old
C /usr C /usr
C /usr/local C /usr/local
C /usr/local/bin C /usr/local/bin
A /usr/local/bin/docker-entrypoint.sh A /usr/local/bin/docker-entrypoint.sh
``` ```
Display image differences between two different images in JSON format:
``` ```
$ podman diff --format json redis:old redis:alpine $ podman image diff --format json redis:old redis:alpine
{ {
"changed": [ "changed": [
"/usr", "/usr",

View File

@ -20,20 +20,18 @@ Print usage statement
## EXAMPLES ## EXAMPLES
Check if an image called `webclient` exists in local storage (the image does actually exist). Check if an image called `webclient` exists in local storage (the image does actually exist):
``` ```
$ podman image exists webclient $ podman image exists webclient
$ echo $? $ echo $?
0 0
$
``` ```
Check if an image called `webbackend` exists in local storage (the image does not actually exist). Check if an image called `webbackend` exists in local storage (the image does not actually exist):
``` ```
$ podman image exists webbackend $ podman image exists webbackend
$ echo $? $ echo $?
1 1
$
``` ```
## SEE ALSO ## SEE ALSO

View File

@ -47,6 +47,7 @@ Valid placeholders for the Go template are listed below:
## EXAMPLE ## EXAMPLE
Inspect information on the specified image:
``` ```
$ podman image inspect fedora $ podman image inspect fedora
[ [
@ -120,6 +121,7 @@ $ podman image inspect fedora
] ]
``` ```
Inspect image ID for the specified image:
``` ```
$ podman image inspect --format '{{ .Id }}' fedora $ podman image inspect --format '{{ .Id }}' fedora
37e5619f4a8ca9dbc4d6c0ae7890625674a10dbcfb76201399e2aaddb40da17d 37e5619f4a8ca9dbc4d6c0ae7890625674a10dbcfb76201399e2aaddb40da17d

View File

@ -32,20 +32,21 @@ Print the mounted images in specified format (json).
## EXAMPLE ## EXAMPLE
Mount multiple images. Note: In rootless mode, image mounting works only after executing the podman unshare command to enter the user namespace.
``` ```
podman image mount fedora ubi8-init podman image mount fedora ubi8-init
/var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
/var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
``` ```
List mounted images:
``` ```
podman mount podman image mount
registry.fedoraproject.org/fedora:latest /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged registry.fedoraproject.org/fedora:latest /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
registry.access.redhat.com/ubi8-init:latest /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged registry.access.redhat.com/ubi8-init:latest /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
``` ```
List mounted images in JSON format:
``` ```
podman image mount --format json podman image mount --format json
[ [

View File

@ -49,7 +49,7 @@ Print usage statement
## EXAMPLES ## EXAMPLES
Remove all dangling images from local storage Remove all dangling images from local storage:
``` ```
$ sudo podman image prune $ sudo podman image prune
@ -59,7 +59,7 @@ f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907 324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
``` ```
Remove all unused images from local storage without confirming Remove all unused images from local storage without confirming:
``` ```
$ sudo podman image prune -a -f $ sudo podman image prune -a -f
f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
@ -71,7 +71,7 @@ e4e5109420323221f170627c138817770fb64832da7d8fe2babd863148287fca
``` ```
Remove all unused images from local storage since given time/hours. Remove all unused images from local storage since given time/hours:
``` ```
$ sudo podman image prune -a --filter until=2019-11-14T06:15:42.937792374Z $ sudo podman image prune -a --filter until=2019-11-14T06:15:42.937792374Z
@ -91,7 +91,7 @@ f3e20dc537fb04cb51672a5cb6fdf2292e61d411315549391a0d1f64e4e3097e
324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907 324a7a3b2e0135f4226ffdd473e4099fd9e477a74230cdc35de69e84c0f9d907
``` ```
Remove all unused images from local storage with label version 1.0 Remove all unused images from local storage with label version 1.0:
``` ```
$ sudo podman image prune -a -f --filter label=version=1.0 $ sudo podman image prune -a -f --filter label=version=1.0
e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9 e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
@ -102,7 +102,6 @@ e813d2135f17fadeffeea8159a34cfdd4c30b98d8111364b913a91fd930643e9
f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c f9f0a8a58c9e02a2b3250b88cc5c95b1e10245ca2c4161d19376580aaa90f55c
1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707 1ef14d5ede80db78978b25ad677fd3e897a578c3af614e1fda608d40c8809707
45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2 45e1482040e441a521953a6da2eca9bafc769e15667a07c23720d6e0cafc3ab2
``` ```
## SEE ALSO ## SEE ALSO

View File

@ -30,12 +30,13 @@ Suppress the output
## EXAMPLES ## EXAMPLES
Copy specified image to local storage:
``` ```
$ podman image scp alpine $ podman image scp alpine
Loaded image: docker.io/library/alpine:latest Loaded image: docker.io/library/alpine:latest
``` ```
Copy specified image from local storage to remote connection:
``` ```
$ podman image scp alpine Fedora::/home/charliedoern/Documents/alpine $ podman image scp alpine Fedora::/home/charliedoern/Documents/alpine
Getting image source signatures Getting image source signatures
@ -46,11 +47,13 @@ Storing signatures
Loaded image: docker.io/library/alpine:latest Loaded image: docker.io/library/alpine:latest
``` ```
Copy specified image from remote connection to remote connection:
``` ```
$ podman image scp Fedora::alpine RHEL:: $ podman image scp Fedora::alpine RHEL::
Loaded image: docker.io/library/alpine:latest Loaded image: docker.io/library/alpine:latest
``` ```
Copy specified image via ssh to local storage:
``` ```
$ podman image scp charliedoern@192.168.68.126:22/run/user/1000/podman/podman.sock::alpine $ podman image scp charliedoern@192.168.68.126:22/run/user/1000/podman/podman.sock::alpine
WARN[0000] Unknown connection name given. Please use system connection add to specify the default remote socket location WARN[0000] Unknown connection name given. Please use system connection add to specify the default remote socket location
@ -62,6 +65,7 @@ Storing signatures
Loaded image: docker.io/library/alpine:latest Loaded image: docker.io/library/alpine:latest
``` ```
Copy specified image from root account to user accounts local storage:
``` ```
$ sudo podman image scp root@localhost::alpine username@localhost:: $ sudo podman image scp root@localhost::alpine username@localhost::
Copying blob e2eb06d8af82 done Copying blob e2eb06d8af82 done
@ -76,6 +80,7 @@ Storing signatures
Loaded image: docker.io/library/alpine:latest Loaded image: docker.io/library/alpine:latest
``` ```
Copy specified image from root account to local storage:
``` ```
$ sudo podman image scp root@localhost::alpine $ sudo podman image scp root@localhost::alpine
Copying blob e2eb06d8af82 done Copying blob e2eb06d8af82 done

View File

@ -23,10 +23,8 @@ Show all child images and layers of the specified image
## EXAMPLES ## EXAMPLES
List image tree information on specified image:
``` ```
$ podman pull docker.io/library/wordpress
$ podman pull docker.io/library/php:7.2-apache
$ podman image tree docker.io/library/wordpress $ podman image tree docker.io/library/wordpress
Image ID: 6e880d17852f Image ID: 6e880d17852f
Tags: [docker.io/library/wordpress:latest] Tags: [docker.io/library/wordpress:latest]
@ -51,10 +49,10 @@ Image Layers
├── ID: 834f4497afda Size: 7.168kB ├── ID: 834f4497afda Size: 7.168kB
├── ID: bfe2ce1263f8 Size: 40.06MB ├── ID: bfe2ce1263f8 Size: 40.06MB
└── ID: 748e99b214cf Size: 11.78kB Top Layer of: [docker.io/library/wordpress:latest] └── ID: 748e99b214cf Size: 11.78kB Top Layer of: [docker.io/library/wordpress:latest]
```
$ podman pull docker.io/circleci/ruby:latest Show all child images and layers of the specified image:
$ podman pull docker.io/library/ruby:latest ```
$ podman image tree ae96a4ad4f3f --whatrequires $ podman image tree ae96a4ad4f3f --whatrequires
Image ID: ae96a4ad4f3f Image ID: ae96a4ad4f3f
Tags: [docker.io/library/ruby:latest] Tags: [docker.io/library/ruby:latest]

View File

@ -78,18 +78,19 @@ Trust may be updated using the command **podman image trust set** for an existin
## EXAMPLES ## EXAMPLES
Accept all unsigned images from a registry Accept all unsigned images from a registry:
sudo podman image trust set --type accept docker.io
Modify default trust policy
sudo podman image trust set -t reject default
Display system trust policy
podman image trust show
``` ```
sudo podman image trust set --type accept docker.io
```
Modify default trust policy:
```
sudo podman image trust set -t reject default
```
Display system trust policy:
```
podman image trust show
TRANSPORT NAME TYPE ID STORE TRANSPORT NAME TYPE ID STORE
all default reject all default reject
repository docker.io/library accept repository docker.io/library accept
@ -99,10 +100,9 @@ repository docker.io reject
docker-daemon accept docker-daemon accept
``` ```
Display trust policy file Display trust policy file:
podman image trust show --raw
``` ```
podman image trust show --raw
{ {
"default": [ "default": [
{ {
@ -147,10 +147,9 @@ Display trust policy file
} }
``` ```
Display trust as JSON Display trust as JSON:
podman image trust show --json
``` ```
podman image trust show --json
[ [
{ {
"transport": "all", "transport": "all",

View File

@ -32,17 +32,17 @@ Note: Other processes using the file system can fail if the mount point is remov
## EXAMPLE ## EXAMPLE
Unmount image with a given ID Unmount image with a given ID:
``` ```
podman image unmount imageID podman image unmount imageID
``` ```
Unmount multiple images with given IDs Unmount multiple images with given IDs:
``` ```
podman image unmount imageID1 imageID2 imageID3 podman image unmount imageID1 imageID2 imageID3
``` ```
Unmount all images Unmount all images:
``` ```
podman image unmount --all podman image unmount --all
``` ```