about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorYorick <yorick@yorickvanpelt.nl>2020-01-28 22:00:54 +0100
committerlewo <lewo@abesis.fr>2020-01-28 22:00:54 +0100
commit508343962ea26e9da9a4c0c10009bfba85f50021 (patch)
tree32868d471d2747212bccaaac5da67da8fd5b38ea /nixos/tests
parentbe529459740c5dad2da7e51b89524357ba9ef080 (diff)
downloadnixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar.gz
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar.bz2
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar.lz
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar.xz
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.tar.zst
nixlib-508343962ea26e9da9a4c0c10009bfba85f50021.zip
nixos/docker-containers: add imageFile and dependsOn options
- the `imageFile` option allows to load an image from a derivation
- the  `dependsOn` option can be used to specify dependencies between container systemd units.

Co-authored-by: Christian Höppner <mkaito@users.noreply.github.com>
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/docker-containers.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/tests/docker-containers.nix b/nixos/tests/docker-containers.nix
index 972552735202..9be9bfa80ce0 100644
--- a/nixos/tests/docker-containers.nix
+++ b/nixos/tests/docker-containers.nix
@@ -1,9 +1,11 @@
 # Test Docker containers as systemd units
 
-import ./make-test.nix ({ pkgs, lib, ... }: {
+import ./make-test.nix ({ pkgs, lib, ... }:
+
+{
   name = "docker-containers";
   meta = {
-    maintainers = with lib.maintainers; [ benley ];
+    maintainers = with lib.maintainers; [ benley mkaito ];
   };
 
   nodes = {
@@ -11,10 +13,9 @@ import ./make-test.nix ({ pkgs, lib, ... }: {
       {
         virtualisation.docker.enable = true;
 
-        virtualisation.dockerPreloader.images = [ pkgs.dockerTools.examples.nginx ];
-
         docker-containers.nginx = {
           image = "nginx-container";
+          imageFile = pkgs.dockerTools.examples.nginx;
           ports = ["8181:80"];
         };
       };