Podman: Difference between revisions
imported>Eoli3n No edit summary |
imported>JohnAZoidberg Add instructions for new Podman module |
||
| Line 1: | Line 1: | ||
Podman can run rootless | Podman can run rootless containers and be a drop-in replacement for Docker. | ||
== Install podman == | == Install and configure podman with NixOS service configuration (NixOS unstable) == | ||
<syntaxHighlight lang="nix"> | |||
{ pkgs, ... }: | |||
{ | |||
virtualisation = { | |||
# To map subuid and subguid for your user and allow rootless containers | |||
containers.users = [ "yourusername" ]; | |||
podman = { | |||
enable = true; | |||
# Create a `docker` alias for podman, to use it as a drop-in replacement | |||
dockerCompat = true; | |||
}; | |||
}; | |||
} | |||
</syntaxHighlight> | |||
== Old manual configuration (NixOS <=20.03) == | |||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
| Line 10: | Line 30: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Configure subuid/subgid for your user == | === Configure subuid/subgid for your user === | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
| Line 20: | Line 40: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Create configuration files == | === Create configuration files === | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||