Add parameter for building the lambda function dependencies as user instead of root
This commit is contained in:
@@ -87,9 +87,10 @@ def make_python_zip_bundle(input_path: str,
|
|||||||
|
|
||||||
# builds requirements using target runtime
|
# builds requirements using target runtime
|
||||||
build_log = execute_shell_command(command=[
|
build_log = execute_shell_command(command=[
|
||||||
'docker', 'run', '--rm',
|
docker, 'run', '--rm',
|
||||||
'-v', f'{input_path}:/app',
|
'-v', f'{input_path}:/app',
|
||||||
'-w', '/app',
|
'-w', '/app',
|
||||||
|
'-u', '$(id -u):$(id -g)',
|
||||||
lambda_runtime_docker_image,
|
lambda_runtime_docker_image,
|
||||||
'pip', 'install',
|
'pip', 'install',
|
||||||
'-r', requirements_file,
|
'-r', requirements_file,
|
||||||
|
|||||||
Reference in New Issue
Block a user