Docker: Difference between revisions
m →Setup: Switch warning for security warning |
→Docker Containers as systemd Services: make clearer oci-containers uses podman by default but can also use docker |
||
| Line 69: | Line 69: | ||
To make sure some docker containers are running as systemd services, you can use <code>oci-containers</code>: | To make sure some docker containers are running as systemd services, you can use <code>oci-containers</code>: | ||
< | <syntaxhighlight lang="nix"> | ||
virtualisation.oci-containers = { | virtualisation.oci-containers = { | ||
# backend defaults to "podman" | |||
backend = "docker"; | backend = "docker"; | ||
containers = { | containers = { | ||
| Line 78: | Line 79: | ||
}; | }; | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
A more advanced example<syntaxhighlight lang="nixos"> | A more advanced example<syntaxhighlight lang="nixos"> | ||
| Line 101: | Line 102: | ||
==== Usage ==== | ==== Usage ==== | ||
NixOS uses Podman to run OCI containers. Note that these are '''user-specific''', so running commands with or without sudo can change your output. | Unless otherwise specified, NixOS uses Podman to run OCI containers. Note that these are '''user-specific''', so running commands with or without sudo can change your output. | ||
List containers<syntaxhighlight lang="console"> | List containers<syntaxhighlight lang="console"> | ||