Fix up example description of podman-container commands

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2024-02-17 13:36:23 -05:00
parent 25a96d7a44
commit 606865a47e
2 changed files with 9 additions and 3 deletions

View File

@ -92,21 +92,26 @@ When set to true, this flag runs the newly created container after the
clone process has completed, this specifies a detached running mode. clone process has completed, this specifies a detached running mode.
## EXAMPLES ## EXAMPLES
Clone specified container into a new container:
``` ```
# podman container clone d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7 # podman container clone d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7
6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584 6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584
``` ```
Clone specified container into a newly named container:
``` ```
# podman container clone --name=clone d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7 # podman container clone --name=clone d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7
6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584 6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584
``` ```
Replace specified container with selected resource constraints into a new container, removing original container:
``` ```
# podman container clone --destroy --cpus=5 d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7 # podman container clone --destroy --cpus=5 d0cf1f782e2ed67e8c0050ff92df865a039186237a4df24d7acba5b1fa8cc6e7
6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584 6b2c73ff8a1982828c9ae2092954bcd59836a131960f7e05221af9df5939c584
``` ```
Clone specified container giving a new name and then replacing the image of the original container with the specified image name:
``` ```
# podman container clone 2d4d4fca7219b4437e0d74fcdc272c4f031426a6eacd207372691207079551de new_name fedora # podman container clone 2d4d4fca7219b4437e0d74fcdc272c4f031426a6eacd207372691207079551de new_name fedora
Resolved "fedora" as an alias (/etc/containers/registries.conf.d/shortnames.conf) Resolved "fedora" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
@ -118,6 +123,7 @@ Writing manifest to image destination
Storing signatures Storing signatures
5a9b7851013d326aa4ac4565726765901b3ecc01fcbc0f237bc7fd95588a24f9 5a9b7851013d326aa4ac4565726765901b3ecc01fcbc0f237bc7fd95588a24f9
``` ```
## SEE ALSO ## SEE ALSO
**[podman-create(1)](podman-create.1.md)**, **[cgroups(7)](https://man7.org/linux/man-pages/man7/cgroups.7.html)** **[podman-create(1)](podman-create.1.md)**, **[cgroups(7)](https://man7.org/linux/man-pages/man7/cgroups.7.html)**

View File

@ -38,7 +38,7 @@ Print usage statement.\
The default is **false**. The default is **false**.
## EXAMPLES ## EXAMPLES
Remove all stopped containers from local storage Remove all stopped containers from local storage:
``` ```
$ podman container prune $ podman container prune
WARNING! This will remove all stopped containers. WARNING! This will remove all stopped containers.
@ -51,7 +51,7 @@ fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5 602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
``` ```
Remove all stopped containers from local storage without confirmation. Remove all stopped containers from local storage without confirmation:
``` ```
$ podman container prune -f $ podman container prune -f
878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471 878392adf2e6c5c9bb1fc19b69d37d2e98c8abf9d539c0bce4b15b46bbcce471
@ -62,7 +62,7 @@ fff1c5b6c3631746055ec40598ce8ecaa4b82aef122f9e3a85b03b55c0d06c23
602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5 602d343cd47e7cb3dfc808282a9900a3e4555747787ec6723bb68cedab8384d5
``` ```
Remove all stopped containers from local storage created before the last 10 minutes Remove all stopped containers from local storage created before the last 10 minutes:
``` ```
$ podman container prune --filter until="10m" $ podman container prune --filter until="10m"
WARNING! This will remove all stopped containers. WARNING! This will remove all stopped containers.