Podman

From NixOS Wiki
Revision as of 08:43, 21 January 2020 by imported>Eoli3n (Created page with "== Install podman == <syntaxHighlight lang="nix"> { pkgs, ... }: { environment.systemPackages = with pkgs; [ podman runc conmon slirp4netns fuse-overlayfs ]; } </syntaxHigh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install podman

{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; [ podman runc conmon slirp4netns fuse-overlayfs ];
}

Configure subuid/subgid for your user

users.users.username.subUidRanges = [{ startUid = 100000; count = 65536; }];
users.users.username.subGidRanges = [{ startGid = 100000; count = 65536; }];

Create configuration files

environment.etc."containers/policy.json" = {
  mode="0644";
  text=''
    {
      "default": [
        {
          "type": "insecureAcceptAnything"
        }
      ],
      "transports":
        {
          "docker-daemon":
            {
              "": [{"type":"insecureAcceptAnything"}]
            }
        }
    }
  '';
};

environment.etc."containers/registries.conf" = {
  mode="0644";
  text=''
    [registries.search]
    registries = ['docker.io', 'quay.io']
  '';
};