podman-*: add page (#8785)

pull/13/head
Brock R 2023-03-11 13:52:08 -07:00 committed by GitHub
parent ad4af3a8c6
commit 8d7bd99fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 137 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# podman image
> Manage Docker images.
> See also `podman build`, `podman import`, and `podman pull`.
> More information: <https://docs.podman.io/en/latest/markdown/podman-image.1.html>.
- List local Docker images:
`podman image ls`
- Delete unused local Docker images:
`podman image prune`
- Delete all unused images (not just those without a tag):
`podman image prune --all`
- Show the history of a local Docker image:
`podman image history {{image}}`

View File

@ -0,0 +1,24 @@
# podman images
> Manage Podman images.
> More information: <https://docs.podman.io/en/latest/markdown/podman-images.1.html>.
- List all Podman images:
`podman images`
- List all Podman images including intermediates:
`podman images --all`
- List the output in quiet mode (only numeric IDs):
`podman images --quiet`
- List all Podman images not used by any container:
`podman images --filter dangling=true`
- List images that contain a substring in their name:
`podman images "{{*image|image*}}"`

36
pages/common/podman-ps.md Normal file
View File

@ -0,0 +1,36 @@
# podman ps
> List Podman containers.
> More information: <https://docs.podman.io/en/latest/markdown/podman-ps.1.html>.
- List currently running podman containers:
`podman ps`
- List all podman containers (running and stopped):
`podman ps --all`
- Show the latest created container (includes all states):
`podman ps --latest`
- Filter containers that contain a substring in their name:
`podman ps --filter="name={{name}}"`
- Filter containers that share a given image as an ancestor:
`podman ps --filter "ancestor={{image}}:{{tag}}"`
- Filter containers by exit status code:
`podman ps --all --filter="exited={{code}}"`
- Filter containers by status (created, running, removing, paused, exited and dead):
`podman ps --filter="status={{status}}"`
- Filter containers that mount a specific volume or have a volume mounted in a specific path:
`podman ps --filter="volume={{path/to/directory}}" --format "table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Mounts}}"`

View File

@ -0,0 +1,20 @@
# podman rmi
> Remove one or more Podman images.
> More information: <https://docs.podman.io/en/latest/markdown/podman-rmi.1.html>.
- Remove one or more images given their names:
`podman rmi {{image:tag}} {{image2:tag}} {{...}}`
- Force remove an image:
`podman rmi --force {{image}}`
- Remove an image without deleting untagged parents:
`podman rmi --no-prune {{image}}`
- Display help:
`podman rmi`

View File

@ -0,0 +1,36 @@
# podman run
> Run a command in a new Podman container.
> More information: <https://docs.podman.io/en/latest/markdown/podman-run.1.html>.
- Run command in a new container from a tagged image:
`podman run {{image:tag}} {{command}}`
- Run command in a new container in background and display its ID:
`podman run --detach {{image:tag}} {{command}}`
- Run command in a one-off container in interactive mode and pseudo-TTY:
`podman run --rm --interactive --tty {{image:tag}} {{command}}`
- Run command in a new container with passed environment variables:
`podman run --env '{{variable}}={{value}}' --env {{variable}} {{image:tag}} {{command}}`
- Run command in a new container with bind mounted volumes:
`podman run --volume {{/path/to/host_path}}:{{/path/to/container_path}} {{image:tag}} {{command}}`
- Run command in a new container with published ports:
`podman run --publish {{host_port}}:{{container_port}} {{image:tag}} {{command}}`
- Run command in a new container overwriting the entrypoint of the image:
`podman run --entrypoint {{command}} {{image:tag}}`
- Run command in a new container connecting it to a network:
`podman run --network {{network}} {{image:tag}}`