diff --git a/pages/common/podman-image.md b/pages/common/podman-image.md new file mode 100644 index 000000000..e9dda97d8 --- /dev/null +++ b/pages/common/podman-image.md @@ -0,0 +1,21 @@ +# podman image + +> Manage Docker images. +> See also `podman build`, `podman import`, and `podman pull`. +> More information: . + +- 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}}` diff --git a/pages/common/podman-images.md b/pages/common/podman-images.md new file mode 100644 index 000000000..8312aa645 --- /dev/null +++ b/pages/common/podman-images.md @@ -0,0 +1,24 @@ +# podman images + +> Manage Podman images. +> More information: . + +- 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*}}"` diff --git a/pages/common/podman-ps.md b/pages/common/podman-ps.md new file mode 100644 index 000000000..d77dbaa5e --- /dev/null +++ b/pages/common/podman-ps.md @@ -0,0 +1,36 @@ +# podman ps + +> List Podman containers. +> More information: . + +- 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}}"` diff --git a/pages/common/podman-rmi.md b/pages/common/podman-rmi.md new file mode 100644 index 000000000..3b72560ed --- /dev/null +++ b/pages/common/podman-rmi.md @@ -0,0 +1,20 @@ +# podman rmi + +> Remove one or more Podman images. +> More information: . + +- 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` diff --git a/pages/common/podman-run.md b/pages/common/podman-run.md new file mode 100644 index 000000000..043f14120 --- /dev/null +++ b/pages/common/podman-run.md @@ -0,0 +1,36 @@ +# podman run + +> Run a command in a new Podman container. +> More information: . + +- 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}}`