Steps to install podman on mac
- Instal podman and podman-desktop
brew install podman
brew install podman-desktop - Init and start podman
podman machine init
podman machine start - Start podman deskop
- Clone alpine_nginx
git clone http://github.com/baude/alpine_nginx && cd alpine_nginx
- Create nginx image using podman build
podman build -t alpine_nginx .
- Run podman
podman run -dt -p 9999:80 alpine_nginx
- Check running containers
podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 81f64310c60c localhost/alpine_nginx:latest nginx -g daemon o... 6 minutes ago Up 6 minutes ago 0.0.0.0:9999->80/tcp cool_tu
- Use curl to connect to container
curl http://localhost:9999
- Connect and get a shell on container
podman exec -it cool_tu /bin/sh
- Connect to VM using ssh (not to above container)
podman machine ssh
- Stop and rm podman machine
podman machine stop
podman machine rm