Podman: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 11: | Line 11: | ||
* {{ kbd | key=<nowiki>docker logs [OPTIONS] CONTAINER</nowiki>}} <ref>[https://docs.docker.com/engine/reference/commandline/logs/ docker logs | Docker Documentation]</ref> | * {{ kbd | key=<nowiki>docker logs [OPTIONS] CONTAINER</nowiki>}} <ref>[https://docs.docker.com/engine/reference/commandline/logs/ docker logs | Docker Documentation]</ref> | ||
* {{ kbd | key=<nowiki>podman logs [options] container [container…]</nowiki>}} e.g {{ kbd | key=<nowiki>podman logs <CONTAINER_ID_OR_NAME></nowiki>}} <ref>[https://docs.podman.io/en/latest/markdown/podman-logs.1.html podman-logs — Podman documentation]</ref> | * {{ kbd | key=<nowiki>podman logs [options] container [container…]</nowiki>}} e.g {{ kbd | key=<nowiki>podman logs <CONTAINER_ID_OR_NAME></nowiki>}} <ref>[https://docs.podman.io/en/latest/markdown/podman-logs.1.html podman-logs — Podman documentation]</ref> | ||
** If the content of log is too long, enter the command to brief the content {{ kbd | key=<nowiki>podman logs --tail=10 <CONTAINER_ID_OR_NAME></nowiki>}} to output the {{ kbd | key=10}} ({{ kbd | key=<nowiki>--tail=<LINE></nowiki>}}) of LINES at the end of the logs. | |||
== List the images == | == List the images == | ||
Revision as of 10:38, 14 September 2022
"Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System." (Cited from Podman)
Quick links
- Leverage Podman with a Desktop App | Podman Desktop for Win
, macOS
& Linux
Build an image from a Dockerfile
- docker build [OPTIONS] PATH | URL | - [1]
- podman build [options] [context] e.g. podman build -f ./Dockerfile [2]
Display the log of the container
- docker logs [OPTIONS] CONTAINER [3]
- podman logs [options] container [container…] e.g podman logs <CONTAINER_ID_OR_NAME> [4]
- If the content of log is too long, enter the command to brief the content podman logs --tail=10 <CONTAINER_ID_OR_NAME> to output the 10 (--tail=<LINE>) of LINES at the end of the logs.
List the images
List the containers
List running containers
List all containers
- docker container ls -a
- podman ps -a
Remove the container
- docker rm [OPTIONS] CONTAINER [CONTAINER...] e.g. docker container rm <CONTAINER_ID> [9]
- podman rm [options] container e.g. podman rm <CONTAINER_ID> [10]
Start the container from image
- docker run [OPTIONS] IMAGE [COMMAND] [ARG...] [11]
- podman run [options] image [command [arg …]] e.g. podman run --name <CONTAINER_NAME> <IMAGE_ID> [12]
References
- ↑ docker build | Docker Documentation
- ↑ podman-build — Podman documentation
- ↑ docker logs | Docker Documentation
- ↑ podman-logs — Podman documentation
- ↑ docker image ls | Docker Documentation
- ↑ podman-images — Podman documentation
- ↑ docker container ls | Docker Documentation
- ↑ podman-ps — Podman documentation
- ↑ docker rm | Docker Documentation
- ↑ podman-rm — Podman documentation
- ↑ docker run | Docker Documentation
- ↑ podman-run — Podman documentation