Podman and Docker/shaare/rR19ZA
Containers → Podman
- Podman → manage pods and container images
- Buildah → building/pushing/signing container images
- Skopeo → copy/inspect/delete/signing
- Runc → run & build feature to Podman and Buildah
- Crun → optional runtime for rootless containers
Podman Terms
-
Images → containers can be created through images
- converted to images
- Pods → group of containers deployed on the host
Commands
dnf install podman-
alias docker=podman- create alias to use Podman instead of Docker
podman info→ check Podman registry-
podman search httpd- search specific repository
- check stars for the best
Podman & Docker Commands
podman images→ check previously installed imagespodman pull docker.io/library/httpd→ download and install imagepodman ps→ list running containerspodman run -dt -p 8080:80/tcp docker.io/library/httpd→ run a downloaded podman containerpodman logs -l→ check the logspodman stop <container_name|id>→ stop container- To run multiple containers, change port:
8081and8082 podman stop/start <container_name|id>→ stop/start containerpodman create --name httpd2 docker.io/library/httpd→ create new container from downloaded image
Podman Container at Startup
-
Generate a unit file:
podman generate systemd --new --files --name httpd cp container-httpd.service /etc/systemd/system/ systemctl enable container-httpd.service systemctl start container-httpd.service
Docker
- Install from:
docs.docker.com systemctl start dockersystemctl enable dockerdocker run hello-world→ test if Docker is working
(97)