build with --template-only to not require running docker service
Add a try/except check and raise excpetion if not --template-only Reason for this is so that you can run kolla_build --template-only on a system with a user that doesn't have permissions to access docker or system may not have docker service running. The template only generation is ok because it doesn't specifically need the docker context Change-Id: I191f3e073d14e9ba5419a8a9b043e8afaa565e2a
This commit is contained in:
parent
2aefc3d8fa
commit
9cc7667a51
|
@ -710,7 +710,12 @@ class KollaWorker(object):
|
|||
self.maintainer = conf.maintainer
|
||||
|
||||
docker_kwargs = docker.utils.kwargs_from_env()
|
||||
self.dc = docker.APIClient(version='auto', **docker_kwargs)
|
||||
try:
|
||||
self.dc = docker.APIClient(version='auto', **docker_kwargs)
|
||||
except docker.errors.DockerException as e:
|
||||
self.dc = None
|
||||
if not conf.template_only:
|
||||
raise e
|
||||
|
||||
def _get_images_dir(self):
|
||||
possible_paths = (
|
||||
|
|
Loading…
Reference in New Issue