From a81c27cd54f4badd24924e82f0d7da7285137534 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Fri, 15 Jan 2021 15:53:31 +0200 Subject: [PATCH 1/3] docker: fix systemd socket activation --- nixos/modules/virtualisation/docker.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index f0ee2fe1460..83d90d9fc97 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -165,7 +165,7 @@ in '' ${cfg.package}/bin/dockerd \ --group=docker \ - --host=unix:// \ + --host=fd:// \ --log-driver=${cfg.logDriver} \ ${optionalString (cfg.storageDriver != null) "--storage-driver=${cfg.storageDriver}"} \ ${optionalString cfg.liveRestore "--live-restore" } \ From f53cf9a65c83c400aec421cb2eb105acc75431f6 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Fri, 15 Jan 2021 15:53:43 +0200 Subject: [PATCH 2/3] Revert "nixos/tests/docker: wait for docker service" This reverts commit c14bafd6c7db3b0c03574e28831821adda22a6f1. --- nixos/tests/docker-tools.nix | 2 +- nixos/tests/docker.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index e2bd9ddf647..6638ec4927c 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -18,7 +18,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = with pkgs.dockerTools; '' unix_time_second1 = "1970-01-01T00:00:01Z" - docker.wait_for_unit("docker.service") + docker.wait_for_unit("sockets.target") with subtest("Ensure Docker images use a stable date by default"): docker.succeed( diff --git a/nixos/tests/docker.nix b/nixos/tests/docker.nix index a0f328af775..58e33535ed3 100644 --- a/nixos/tests/docker.nix +++ b/nixos/tests/docker.nix @@ -33,7 +33,7 @@ import ./make-test-python.nix ({ pkgs, ...} : { testScript = '' start_all() - docker.wait_for_unit("docker.service") + docker.wait_for_unit("sockets.target") docker.succeed("tar cv --files-from /dev/null | docker import - scratchimg") docker.succeed( "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" From 40000911235ca99ed5af4330356fb76ffeb6197d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 15 Jan 2021 14:56:29 +0100 Subject: [PATCH 3/3] nixos/docker: change misleading error message The socketActivation option was removed, but later on socket activation was added back without the option to disable it. The description now reflects that socket activation is used unconditionally in the current setup. --- nixos/modules/virtualisation/docker.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index 83d90d9fc97..689f664b676 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -216,7 +216,7 @@ in ]); imports = [ - (mkRemovedOptionModule ["virtualisation" "docker" "socketActivation"] "This option was removed in favor of starting docker at boot") + (mkRemovedOptionModule ["virtualisation" "docker" "socketActivation"] "This option was removed and socket activation is now always active") ]; }