Mac安装运行Podman
Page content
Install Podman
brew install podman
Create and start Podman machine:
podman machine init
podman machine start
Verify podman info
podman info
Download image
podman image pull redis
podman image list --all
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/redis latest 3e12e2ceb68f 56 minutes ago 121 MB
Run cmd in new container
podman run redis
List container
podman container list -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
83948cb48890 docker.io/library/redis:latest redis-server About a minute ago Up About a minute ago clever_sinoussi
podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
83948cb48890 docker.io/library/redis:latest redis-server About a minute ago Up About a minute ago clever_sinoussi
Jump into container
podman exec --interactive --tty 83948cb48890 /bin/bash
# Update things
apt-get update; apt-get -y dist-upgrade
Removing the container
Containers need to be stopped in order to remove them:
podman stop mycontainer
podman rm mycontainer
本文由 络壳 原创或整理,转载请注明出处