瀏覽代碼

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 年之前
父節點
當前提交
596261e759
共有 1 個文件被更改,包括 2 次插入0 次删除
  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():