0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

macOS で Podman を動かす

Posted at

インストール

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
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?