razzi.abuissa.net

Razzi's guide to podman

podman is a lot like docker but it’s totally open source. The main way this presents itself in usage is that you need to install and run GUI app Docker for Mac to run docker, but podman you can just run commands.

basic usage

If you try to run a podman command without starting the podman virtual machine, you’ll get a helpful error:

$ podman run hello
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
Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:53554: connect: connection refused

So you’ll need to create and start the machine as follows:

$ podman machine init
...
To start your machine run:

	podman machine start

$ podman machine start
...
Machine "podman-machine-default" started successfully
$ podman run hello
...
!... Hello Podman World ...!

         .--"--.
       / -     - \
      / (O)   (O) \
   ~~~| -=(,Y,)=- |
    .---. /`  \   |~~
 ~/  o  o \~~~~.----. ~~
  | =(X)= |~  / (O (O) \
   ~~~~~~~  ~| =(Y_)=-  |
  ~~~~    ~~~|   U      |~~

...

You’ll also see some instructions for dealing with docker clients if you’re using podman as the server but want to run docker commands.

run debian

The simplest useful thing to do with podman is to run a debian container.

$ podman run -it debian
root@b0160e04aabe:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"

running podman with lima

See also the section in my lima guide.

This is an alternative to running the podman machine commands.

source code

https://github.com/containers/podman

depends on