14,974
edits
No edit summary |
m (→References) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
"Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System." (Cited from [https://podman.io/ Podman]) | "Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System." (Cited from [https://podman.io/ Podman]) | ||
== Quick links == | |||
* [https://podman-desktop.io/ Leverage Podman with a Desktop App | Podman Desktop] for {{Win}}, {{Mac}} & {{Linux}} | |||
== Build an image from a Dockerfile == | == Build an image from a Dockerfile == | ||
| Line 7: | Line 10: | ||
== Display the log of the container == | == Display the log of the container == | ||
* {{ 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 < | * {{ 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 == | ||
| Line 21: | Line 25: | ||
* {{ kbd | key=<nowiki>docker container ls -a</nowiki>}} | * {{ kbd | key=<nowiki>docker container ls -a</nowiki>}} | ||
* {{ kbd | key=podman ps -a}} | * {{ kbd | key=podman ps -a}} | ||
== Remove the container == | |||
* {{ kbd | key=<nowiki>docker rm [OPTIONS] CONTAINER [CONTAINER...]</nowiki>}} e.g. {{ kbd | key=<nowiki>docker container rm <CONTAINER_ID></nowiki>}} <ref>[https://docs.docker.com/engine/reference/commandline/rm/ docker rm | Docker Documentation]</ref> | |||
* {{ kbd | key=<nowiki>podman rm [options] container</nowiki>}} e.g. {{ kbd | key=<nowiki>podman rm <CONTAINER_ID></nowiki>}} <ref>[https://docs.podman.io/en/latest/markdown/podman-rm.1.html podman-rm — Podman documentation]</ref> | |||
== Start the container from image == | == Start the container from image == | ||
* {{ kbd | key=<nowiki>docker run [OPTIONS] IMAGE [COMMAND] [ARG...]</nowiki>}} <ref>[https://docs.docker.com/engine/reference/commandline/run/ docker run | Docker Documentation]</ref> | * {{ kbd | key=<nowiki>docker run [OPTIONS] IMAGE [COMMAND] [ARG...]</nowiki>}} <ref>[https://docs.docker.com/engine/reference/commandline/run/ docker run | Docker Documentation]</ref> | ||
* {{ kbd | key=<nowiki>podman run [options] image [command [arg …]]</nowiki>}} e.g. {{ kbd | key=<nowiki>podman run --name <CONTAINER_NAME> <IMAGE_ID></nowiki>}} <ref>[https://docs.podman.io/en/latest/markdown/podman-run.1.html podman-run — Podman documentation]</ref> | * {{ kbd | key=<nowiki>podman run [options] image [command [arg …]]</nowiki>}} e.g. {{ kbd | key=<nowiki>podman run --name <CONTAINER_NAME> <IMAGE_ID></nowiki>}} <ref>[https://docs.podman.io/en/latest/markdown/podman-run.1.html podman-run — Podman documentation]</ref> | ||
== References == | == References == | ||
<references /> | <references /> | ||
[[Category:Web Dev]] | [[Category: Web Dev]] | ||
[[Category: Docker]] | |||