From eaf449c67a3067209ad1b309b68024bde044e429 Mon Sep 17 00:00:00 2001 From: druizz90 <32929872+druizz90@users.noreply.github.com> Date: Thu, 6 Aug 2020 17:08:11 +0200 Subject: [PATCH] Add parameter for building the lambda function dependencies as user instead of root --- once/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/once/utils.py b/once/utils.py index 9db1c9c..4923a20 100644 --- a/once/utils.py +++ b/once/utils.py @@ -87,9 +87,10 @@ def make_python_zip_bundle(input_path: str, # builds requirements using target runtime build_log = execute_shell_command(command=[ - 'docker', 'run', '--rm', + docker, 'run', '--rm', '-v', f'{input_path}:/app', '-w', '/app', + '-u', '$(id -u):$(id -g)', lambda_runtime_docker_image, 'pip', 'install', '-r', requirements_file,