···
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "00000000";
38
+
virtualisation.podman.enable = true;
39
+
virtualisation.podman.extraRuntimes = [ ];
···
rootful.wait_for_unit("sockets.target")
89
+
rootful_norunc.wait_for_unit("sockets.target")
rootless.wait_for_unit("sockets.target")
dns.wait_for_unit("sockets.target")
docker.wait_for_unit("sockets.target")
···
rootful.succeed("podman ps | grep sleeping")
rootful.succeed("podman stop sleeping")
rootful.succeed("podman rm sleeping")
122
+
# now without installed runc
123
+
with subtest("Run runc-less container as root with runc"):
124
+
rootful_norunc.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
125
+
rootful_norunc.fail(
126
+
"podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
129
+
with subtest("Run runc-less container as root with crun"):
130
+
rootful_norunc.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
131
+
rootful_norunc.succeed(
132
+
"podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
134
+
rootful_norunc.succeed("podman ps | grep sleeping")
135
+
rootful_norunc.succeed("podman stop sleeping")
136
+
rootful_norunc.succeed("podman rm sleeping")
138
+
with subtest("Run runc-less container as root with the default backend"):
139
+
rootful_norunc.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
140
+
rootful_norunc.succeed(
141
+
"podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
143
+
rootful_norunc.succeed("podman ps | grep sleeping")
144
+
rootful_norunc.succeed("podman stop sleeping")
145
+
rootful_norunc.succeed("podman rm sleeping")
# start systemd session for rootless
rootless.succeed("loginctl enable-linger alice")