Docker: Difference between revisions
imported>CardboardTurkey m As of 22.05 rootless docker can be used instead of Podman |
imported>Onny Minor cleanup |
||
Line 1: | Line 1: | ||
[https://docker.com Docker] is a utility to pack, ship and run any application as a lightweight container. | |||
== | == Installation == | ||
Inside your <code>configuration.nix</code>: | Inside your <code>configuration.nix</code>: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
virtualisation.docker.enable = true; | |||
</syntaxHighlight> | </syntaxHighlight> | ||
Line 16: | Line 12: | ||
Adding users to the <code>docker</code> group will provide them access to the socket: | Adding users to the <code>docker</code> group will provide them access to the socket: | ||
{{Warning|Beware that the docker group membership is effectively [https://github.com/moby/moby/issues/9976 equivalent to being root]!}} | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
users.users.<myuser>.extraGroups = [ "docker" ]; | |||
</syntaxHighlight> | </syntaxHighlight> | ||
== Building a docker image with nixpkgs == | == Building a docker image with nixpkgs == |