2019-11-02 17:46:04 +00:00
|
|
|
# podman
|
|
|
|
|
|
|
|
> Simple management tool for pods, containers and images.
|
2021-05-20 21:13:41 +01:00
|
|
|
> Podman provides a Docker-CLI comparable command-line. Simply put: `alias docker=podman`.
|
2021-07-06 12:28:21 +01:00
|
|
|
> More information: <https://github.com/containers/podman/blob/main/commands-demo.md>.
|
2019-11-02 17:46:04 +00:00
|
|
|
|
|
|
|
- Print out information about containers:
|
|
|
|
|
|
|
|
`podman ps`
|
|
|
|
|
|
|
|
- List all containers (both running and stopped):
|
|
|
|
|
|
|
|
`podman ps --all`
|
|
|
|
|
|
|
|
- Start one or more containers:
|
|
|
|
|
|
|
|
`podman start {{container_name}} {{container_id}}`
|
|
|
|
|
|
|
|
- Stop one or more running containers:
|
|
|
|
|
|
|
|
`podman stop {{container_name}} {{container_id}}`
|
|
|
|
|
|
|
|
- Pull an image from a registry (defaults to the Docker Hub):
|
|
|
|
|
|
|
|
`podman pull {{image_name}}:{{image_tag}}`
|
|
|
|
|
|
|
|
- Open a shell inside of an already running container:
|
|
|
|
|
|
|
|
`podman exec --interactive --tty {{container_name}} {{sh}}`
|
|
|
|
|
|
|
|
- Remove one or more stopped containers:
|
|
|
|
|
|
|
|
`podman rm {{container_name}} {{container_id}}`
|
|
|
|
|
|
|
|
- Display the logs of one or more containers and follow log output:
|
|
|
|
|
|
|
|
`podman logs --follow {{container_name}} {{container_id}}`
|