# List running containers
podman kill container_name
podman search search_term
# Pull an image with repository specified
podman pull docker.io/library/httpd
# Pull image from Docker Hub
podman pull docker.io/nixos/nix
podman run -dt -p 8080:80/tcp docker.io/library/httpd
## -t pseudo-tty to run commands in interactive shell
# Run container with interactive terminal
podman run -it image_name
# Go into container terminal
podman exec it container_name sh
# Run containers and create a kubernetes deployment for them
podman run -d --name web nginx
podman run -d --name db postgres
# save deployment.yaml in nushell or bash redirect to new file
podman generate kube web db > deployment.yaml
# deployment.yaml can be applied to k8s cluster
# Runs pods locally and view them
podman play kube deployment.yaml
podman stop container_name_or_id
# Stop last started container
podman rm container_name_or_id
# Remove last started container
# Remove multiple containers
podman rm -f container1 container2
# Export pod definitions to k8s yaml like
podman generate kube wordpress-pod > wordpress-pod.yaml
# See processes in a container
# Create pod, managed namespace
podman pod create --name webapp
podman run -d --pod webapp --name redis redis
podman run --rm --pod webapp redis redis-cli -h localhost SET mykey "Hello from Redis"
podman run --rm --pod webapp redis redis-cli -h localhost GET mykey
podman pod inspect webapp
podman logs --container redis
# Windows, macOS start podman host