소스 검색

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():