Browse Source

Merge "build with --template-only to not require running docker service"

tags/7.0.0.0rc1
Zuul 10 months ago
parent
commit
d7cd35ff9a
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      kolla/image/build.py

+ 6
- 1
kolla/image/build.py View File

@@ -710,7 +710,12 @@ class KollaWorker(object):
710 710
         self.maintainer = conf.maintainer
711 711
 
712 712
         docker_kwargs = docker.utils.kwargs_from_env()
713
-        self.dc = docker.APIClient(version='auto', **docker_kwargs)
713
+        try:
714
+            self.dc = docker.APIClient(version='auto', **docker_kwargs)
715
+        except docker.errors.DockerException as e:
716
+            self.dc = None
717
+            if not conf.template_only:
718
+                raise e
714 719
 
715 720
     def _get_images_dir(self):
716 721
         possible_paths = (

Loading…
Cancel
Save