NixOS Containers: Difference between revisions
Denperidge (talk | contribs) m Docker container heading change, example config sub-heading & contents placed inside codeblock |
Denperidge (talk | contribs) Added usage instructions for Declarative OCI containers |
||
| Line 141: | Line 141: | ||
}; | }; | ||
} | } | ||
</syntaxhighlight> | |||
=== 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. | |||
List containers | |||
<syntaxhighlight lang="console"> | |||
# podman ps | |||
</syntaxhighlight> | |||
Update image | |||
<syntaxhighlight lang="console"> | |||
# podman restart hackagecompare | |||
</syntaxhighlight> | |||
List images | |||
<syntaxhighlight lang="console"> | |||
# podman ls | |||
</syntaxhighlight>Remove container<syntaxhighlight lang="console"> | |||
# podman rm hackagecompare | |||
</syntaxhighlight> | |||
Remove image | |||
<syntaxhighlight lang="console"> | |||
# podman rmi c0d9a5f58afe | |||
</syntaxhighlight>Update image<syntaxhighlight lang="console"> | |||
# podman pull chrissound/hackagecomparestats-webserver:latest | |||
</syntaxhighlight> | </syntaxhighlight> | ||