インストール
brew install podman
確認
podman --version
初期設定
podman machine init
起動
podman machine start
停止
podman machine stop
.zshrc
にエイリアスを追記(任意)
alias docker=podman
確認
podman pull nginx # nginx の Docker イメージを pull
podman run --rm -d --name nginx -p 8080:80 nginx # 起動
http://127.0.0.1:8080 にアクセス
起動中のコンテナ確認
podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
023a2239c8b0 docker.io/library/nginx:latest nginx -g daemon o... 5 minutes ago Up 5 minutes 0.0.0.0:8080->80/tcp nginx
停止中のコンテナも含め確認
podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53b2de77d62f quay.io/podman/hello:latest /usr/local/bin/po... 24 hours ago Exited (0) 23 hours ago boring_taussig
023a2239c8b0 docker.io/library/nginx:latest nginx -g daemon o... 6 minutes ago Up 6 minutes 0.0.0.0:8080->80/tcp nginx
コンテナの停止
docker stop <CONTAINER IDまたはNAME>
podman stop 023a2239c8b0