summary refs log tree commit diff
path: root/nixos/release.nix
diff options
context:
space:
mode:
authorlewo <lewo@abesis.fr>2018-11-03 01:00:53 +0100
committerzimbatm <zimbatm@zimbatm.com>2018-11-03 01:00:53 +0100
commit3fb4eb1c432a4f8cc92965db0e7b2c2856bde596 (patch)
tree97cef8a81be6912d10aeee3c83790f56243ae6cb /nixos/release.nix
parentf9bf6cef541542a3b02885e6d28dbacd5b8b8450 (diff)
downloadnixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar.gz
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar.bz2
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar.lz
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar.xz
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.tar.zst
nixpkgs-3fb4eb1c432a4f8cc92965db0e7b2c2856bde596.zip
nixos/dockerPreloader: preload docker images (#49379)
This module permits to preload Docker image in a VM in order to reduce
OIs on file copies. This module has to be only used in testing
environments, when the test requires several Docker images such as in
Kubernetes tests. In this case,
`virtualisation.dockerPreloader.images` can replace the
`services.kubernetes.kubelet.seedDockerImages` options.

The idea is to populate the /var/lib/docker directory by mounting qcow
files (we uses qcow file to avoid permission issues) that contain images.

For each image specified in
config.virtualisation.dockerPreloader.images:
1. The image is loaded by Docker in a VM
2. The resulting /var/lib/docker is written to a QCOW file

This set of QCOW files can then be used to populate the
/var/lib/docker:
1. Each QCOW is mounted in the VM
2. Symlink are created from these mount points to /var/lib/docker
3. A /var/lib/docker/image/overlay2/repositories.json file is generated
4. The docker daemon is started.
Diffstat (limited to 'nixos/release.nix')
-rw-r--r--nixos/release.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/release.nix b/nixos/release.nix
index 51505d6aab9..2bd70f7962f 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -283,6 +283,7 @@ in rec {
   tests.docker-tools = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools.nix {};
   tests.docker-tools-overlay = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools-overlay.nix {};
   tests.docker-edge = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-edge.nix {};
+  tests.docker-preloader = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-preloader.nix {};
   tests.docker-registry = callTest tests/docker-registry.nix {};
   tests.dovecot = callTest tests/dovecot.nix {};
   tests.dnscrypt-proxy = callTestOnMatchingSystems ["x86_64-linux"] tests/dnscrypt-proxy.nix {};