Open19
Podmanを試そう

Macで試します

brew install podman
毎度のごとくbrewコマンドです

podman -h
インストールが終わったらチェック

ひとまずNginxを立ててみよう

searchで探せるらしいので
podman search nginx
実行したら...
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
エラーが出た

try `podman machine init` and `podman machine start`
なるほどな

podman machine init
このとき接続の許可を求められた
迷わず「許可」をクリック

見守る

podman machine start
VMを立ち上げる?ので少々待つ

podman search nginx
再チャレンジ

一番上にあるdocker.io/library/nginx
を使う
Official build of Nginx.
と書いてあるし安全っぽい

podman pull docker.io/library/nginx
podman image list
imageの一覧にnginxがいる
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/nginx latest eb4a57159180 8 hours ago 191 MB

podman run --name docker-nginx -p 8080:80 docker.io/nginx
警告が出たが、これも迷わず「許可」をクリック

削除したいとき
- ctrl + c
podman ps --all
- NAMESにある名前を確認
- podman rm ${NAMES}
podman ps --all

podman machine stop
これするとpodman自体が止まる

参考