podman
June 24, 2024

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
brew install podman
podman info
podman machine init
podman machine init -m 4096 --disk-size 150
podman machine set --memory 4096
podman machine start
podman machine start --log-level debug
podman machine ls
podman machine ls | detect columns
podman machine ls | detect columns | select NAME
podman search redis | detect columns
podman search redis --filter=is-official
podman run -d -p 8080:80 docker.io/library/nginx
podman ps -q
podman kill CONTAINER_ID_OR_NAME

Errors

podman push image got Error: unexpected EOF

For full debug logs

1
2
podman machine ssh
podman push registry.gitlab.com/[GROUP]/[PROJECT] --log-level debug

The memory usage during a push is more than the default installation. Increase VM memory to 4GB.

If you want to create a new podman machine

1
2
3
4
podman machine stop
podman machine rm
podman machine init -m 4096
podman machine start

If you want to modify existing podman machine

1
2
3
podman machine stop
podman machine set --memory 4096
podman machine start

podman machine start hangs on MacOS Intel (x86_64)

https://github.com/containers/podman/issues/25121#issuecomment-2764487184

  1. podman machine reset
  2. podman machine init --log-level debug --now
  3. Wait for the grub menu to come up, then hit e in the 2-second window it gives you.
  4. Edit the line beginning with “linux” and append the “nopku” flag.
  5. Ctrl-X to boot.

https://github.com/containers/podman/issues/25121#issuecomment-2653583685

As a temporary workaround, switch to using the image version 5.2, which is functioning properly on my Intel-based MacOS:

1
podman machine init --cpus=2 --memory=2048 --rootful=true --image=docker://quay.io/podman/machine-os:5.2