mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 09:36:20 +09:00
nixos-container: Use new configuration & state directories
We need to move NixOS containers somewhere else so these don't clash with Podman, Skopeo & other container software in the libpod & cri-o/cri-u/libcontainer ecosystems. The state directory move is not strictly a requirement but is good for consistency.
This commit is contained in:
parent
7d9a979b2e
commit
f535d6f45e
8 changed files with 42 additions and 32 deletions
|
@ -40,7 +40,7 @@ section for details on container networking.)
|
|||
To disable the container, just remove it from `configuration.nix` and
|
||||
run `nixos-rebuild
|
||||
switch`. Note that this will not delete the root directory of the
|
||||
container in `/var/lib/containers`. Containers can be destroyed using
|
||||
container in `/var/lib/nixos-containers`. Containers can be destroyed using
|
||||
the imperative method: `nixos-container destroy foo`.
|
||||
|
||||
Declarative containers can be started and stopped using the
|
||||
|
|
|
@ -10,8 +10,8 @@ You create a container with identifier `foo` as follows:
|
|||
# nixos-container create foo
|
||||
```
|
||||
|
||||
This creates the container's root directory in `/var/lib/containers/foo`
|
||||
and a small configuration file in `/etc/containers/foo.conf`. It also
|
||||
This creates the container's root directory in `/var/lib/nixos-containers/foo`
|
||||
and a small configuration file in `/etc/nixos-containers/foo.conf`. It also
|
||||
builds the container's initial system configuration and stores it in
|
||||
`/nix/var/nix/profiles/per-container/foo/system`. You can modify the
|
||||
initial configuration of the container on the command line. For
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue