From 4beb889e9f5ea09a67ee602de5ac224e1e55200f Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 20 Apr 2023 17:30:54 -0600 Subject: [PATCH] Add DOCKER_HOST inheriting from the caller, to build environment (#360) * Add DOCKER_HOST inheriting from the caller, to build environment * Fix for env var not set Former-commit-id: 9feff35f536a02b4c3986899c988aa620055ea50 --- app/build_containers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/build_containers.py b/app/build_containers.py index 5e8495cb..6cd8f2b8 100644 --- a/app/build_containers.py +++ b/app/build_containers.py @@ -95,6 +95,9 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args): container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {}) container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {}) container_build_env.update({"CERC_CONTAINER_EXTRA_BUILD_ARGS": extra_build_args} if extra_build_args else {}) + docker_host_env = os.getenv("DOCKER_HOST") + if docker_host_env: + container_build_env.update({"DOCKER_HOST": docker_host_env}) def process_container(container): if not quiet: