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 years ago
parent
commit
596261e759
1 changed files with 2 additions and 0 deletions
  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():