Bläddra i källkod

Ensure network exists when calling run before up

Otherwise the daemon will error out because the network doesn't exist
yet.

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 10 år sedan
förälder
incheckning
596261e759
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      compose/cli/main.py

+ 2 - 0
compose/cli/main.py

@@ -380,6 +380,8 @@ class TopLevelCommand(DocoptCommand):
                     start_deps=True,
                     strategy=ConvergenceStrategy.never,
                 )
+            elif project.use_networking:
+                project.ensure_network_exists()
 
         tty = True
         if detach or options['-T'] or not sys.stdin.isatty():