4

I know that in Docker if you want to change the runtime you go to: /etc/docker/daemon.json

And modify:

{
    "runtimes": {
        "runnc": {
            "path": "/usr/sbin/runnc"
        }
    }
}

But how do I do this with Podman (or just add runtime)?

OCIRuntime: package:

runc: /usr/sbin/runc

path: /usr/sbin/runc

jnbdz
  • 897
  • 5
  • 22
  • 43

2 Answers2

4

Container engines will read containers.conf files in up to three locations in the following order:

  1. /usr/share/containers/containers.conf
  2. /etc/containers/containers.conf
  3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)

Items specified in the latter containers.conf, if they exist, override the previous containers.conf settings, or the default settings.

Found this written at top of the /usr/share/containers/containers.conf

Rahul Bali
  • 151
  • 3
  • 1
    This is the right answer. You have to set the option under the `[engine]` table: `runtime ="crun"` – smac89 Mar 23 '21 at 03:15
3

You can find the runtime_path defaults in /usr/share/containers/libpod.conf and overwrite them in /etc/containers/libpod.conf (on EL8, check man podman to find correct place for Your setup).
As there is no daemon this is the conifguration used for all the libpod commands that need to know that.


Edit: as stated by @jnbdz the probably more important default location: in rootless mode $HOME/.config/containers/libpod.conf

EOhm
  • 795
  • 2
  • 7