Podman: Difference between revisions

Malix (talk | contribs)
general enhancements
Malix (talk | contribs)
enhance: headers
 
Line 25: Line 25:
See [https://docs.podman.io/en/stable/markdown/podman-compose.1.html the official documentation]
See [https://docs.podman.io/en/stable/markdown/podman-compose.1.html the official documentation]


=== Using podman with ZFS ===
=== With ZFS ===


Rootless can't use [[ZFS]] directly but the overlay needs POSIX ACL enabled for the underlying ZFS filesystem, ie., <code>acltype=posixacl</code>
Rootless can't use [[ZFS]] directly but the overlay needs POSIX ACL enabled for the underlying ZFS filesystem, ie., <code>acltype=posixacl</code>
Line 31: Line 31:
Best to mount a dataset under <code>/var/lib/containers/storage</code> with property <code>acltype=posixacl</code>.
Best to mount a dataset under <code>/var/lib/containers/storage</code> with property <code>acltype=posixacl</code>.


=== Use Podman within nix-shell ===
=== Within nix-shell ===
From https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947 :<blockquote>{{File|3={ pkgs ? import <nixpkgs> {} }:
From https://gist.github.com/adisbladis/187204cb772800489ee3dac4acdd9947 :<blockquote>{{File|3={ pkgs ? import <nixpkgs> {} }:


Line 89: Line 89:
}|name=podman-shell.nix|lang=nix}}</blockquote>Note that rootless podman requires newuidmap (from shadow). If you're not on NixOS, this cannot be supplied by the Nix package 'shadow' since [https://nixos.org/manual/nix/unstable/expressions/derivations.html setuid/setgid programs are not currently supported by Nix].
}|name=podman-shell.nix|lang=nix}}</blockquote>Note that rootless podman requires newuidmap (from shadow). If you're not on NixOS, this cannot be supplied by the Nix package 'shadow' since [https://nixos.org/manual/nix/unstable/expressions/derivations.html setuid/setgid programs are not currently supported by Nix].


=== Run Podman containers as systemd services ===
=== Containers as systemd services ===
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
{
{
Line 103: Line 103:
</syntaxHighlight>
</syntaxHighlight>


=== Run cross-architecture containers with binfmt/qemu ===
=== Cross-architecture containers using binfmt/qemu ===
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
boot.binfmt = {
boot.binfmt = {
Line 115: Line 115:
</syntaxhighlight>
</syntaxhighlight>


=== DevContainer ===
=== DevContainers ===
Using Podman, it is possible that the process of creation of DevContainers' containers to become stuck at the "Please select an image URL" step.
Using Podman, it is possible that the process of creation of DevContainers' containers to become stuck at the "Please select an image URL" step.