What command to use to changer podman runtime to 'crun' (Fedora 32)

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:

cat /etc/subuid

username-here:100000:65536

cat /etc/subgid

username-here:100000:65536

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

Hope this helps.

1 Like

Thank you Sebastien.

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.

Yes, same here. I guess this is the default runtime for Fedora, so there is no need to precise it neither to install another.

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).

1 Like

Thanks. I’d finally worked it out that Podman had already been configured correctly by Fedora. Even the subgid and subuid had been set up.

1 Like

Thank for making it clear Icts. I’d misunderstand the scope of the --runtime flag.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.