How to use podman as an alternative to docker
⏳ Installation script
https://files.fm/f/fp5cjryw4
⏳ Permissions
chmd +x install.sh
⏳ Run a test container
podman run -dt --name test-container busybox sh -c "echo hello from the container; sleep 20; echo Thank you"
⏳ List containers and pods
podman ps
podman pod ps
⏳ Create a pod
podman pod create --name web --label env=dev -p 8080:80
⏳ Inspect a pod
podman pod inspect web
podman inspect web
podman inspect --format "{{.CreateCommand }}" web
⏳ Attach a container to a pod
podman run -dt --pod web nginx:1.14
podman run -dt --pod web busybox sh -c "echo hello from the container; sleep 10; echo Thank you"
⏳ View logs
podman pod logs web
podman pod logs -c CONTAINER_NAME web
⏳ List pods and containers
podman ps --pod
podman ps -ap
⏳ Start and stop the pod
podman pod start web
podman pod stop web
⏳ Run k8s pod
podman play kube pod-file.yml
podman play kube pod-file.yml --down
podman pod rm POD_NAME
⏳ Alias
alias docker=podman
alias docker-compose=podman-compose