Merge pull request #188795 from Sohalt/oci-containers-wait-for-network
nixos/oci-containers: wait for network before starting container
This commit is contained in:
@@ -230,7 +230,10 @@ let
|
||||
escapedName = escapeShellArg name;
|
||||
in {
|
||||
wantedBy = [] ++ optional (container.autoStart) "multi-user.target";
|
||||
after = lib.optionals (cfg.backend == "docker") [ "docker.service" "docker.socket" ] ++ dependsOn;
|
||||
after = lib.optionals (cfg.backend == "docker") [ "docker.service" "docker.socket" ]
|
||||
# if imageFile is not set, the service needs the network to download the image from the registry
|
||||
++ lib.optionals (container.imageFile == null) [ "network-online.target" ]
|
||||
++ dependsOn;
|
||||
requires = dependsOn;
|
||||
environment = proxy_env;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user