I’m new to podman and containers in general. I want to start simple and run it in a rootless environment (just in case I get things wrong). Following the podman tutorial I ran ```
sudo podman --runtime /usr/bin/crun
as stated in the manual and got the following error message
> Error: missing command 'podman COMMAND'
> Try 'podman --help' for more information.
I am still lost. I will be grateful if anyone can tell me what podman command I need to use.
Hi,
I am not a Podman expert myself but I have recently tinkered with it on Fedora 32 and did not need to setup anything to start using it. I simply added (as root) subuid and subgid for my user:
After that I was able to run containers, for example a Kanboard test instance:
podman run -d --name kanboard -p 8080:80 -t kanboard/kanboard:latest
Then:
podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d40a960107e5 docker.io/kanboard/kanboard:latest 4 seconds ago Up 4 seconds ago kanboard-test
I haven’t tried it yet. But my immediate concern is to understand the concepts and the basics rather than just to run a container. The tutorial says I need to change the default runtime and gives sudo podman --runtime /usr/bin/crun as the command to use. This is obviously incorrect. I’m trying to work out what the missing podman command is. It looks like podman in Fedora 32 might be using the crun runtime by default. I ran podman info and it shows the runtime as crun.
It does use crun by default, so you can omit that flag. Crun is indeed installed as /usr/bin/crun, the reason it didn’t work for you is that you forgot to specify a command for podman to run. That’s what that error message is telling you. Correct usage (but again, you don’t need it on Fedora) would be podman --runtime /usr/bin/crun <some podman command>:
$ which crun
/usr/bin/crun
$ podman --runtime /usr/bin/crun
Error: missing command 'podman COMMAND'
Try 'podman --help' for more information.
$ podman --runtime /usr/bin/crun ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
(The ps command lists containers, and there currently are none on my system).