Browse Source

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 năm trước cách đây
mục cha
commit
596261e759
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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():