From 70d34e67514383ef2ba28667a4f3864f1ba1df0e Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 28 Feb 2023 10:22:27 -0700 Subject: [PATCH] Pass uid and gid to compose Former-commit-id: cea4e5a51f42c01e0e6a4edf8de6ee47400ade1a --- app/deploy_system.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/deploy_system.py b/app/deploy_system.py index 502e0126..d90f042f 100644 --- a/app/deploy_system.py +++ b/app/deploy_system.py @@ -76,8 +76,10 @@ def command(ctx, include, exclude, cluster, command, extra_args): service_name = extra_args_list[0] command_to_exec = extra_args_list[1:] container_exec_env = { - "CERC_SCRIPT_DEBUG": "true" - } if debug else {} + "CERC_HOST_UID": f"{os.getuid()}", + "CERC_HOST_GID": f"{os.getgid()}" + } + container_exec_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {}) if verbose: print(f"Running compose exec {service_name} {command_to_exec}") docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)