podman cheatsheet
remember you can do man podman at anytime.
what is podman?
simple management tool for pods, containers and images. Podman uses buildah to create container images.
commands
-
podman search --limit int <name>-
search a container image from the registries, the limit flag limits the output. The registries path:
/etc/containers/registries*
-
-
podman run -it <image>-
run image while keeping STDIN even if detached (
i), also allocate pseudo-TTY for container (t).
-
-
podman build -t <tag/name> -f <Containerfile>-
build container, with tag from dockerfile.
-
If it complaints about some
crunpermissions thing, you can try adding--cgroup-manager cgroupfsto the command. This is just a workaround not a permanent fix.
-
-
podman images-
list images in local storage
-
-
podman images prune-
remove all images from local storage, a warning will come up
-
-
podman rmi <ID/name>-
remove image by ID or name
-
-
podman inspect <container>-
display container information, you can use
-lto display the info of the last container.
-
-
podman logs <container>-
display container logs, you can use
-lto display the info of the last container.
-
-
podman stop <container>-
stop container or containers, you can use
-lto display the info of the last container.
-