From 12b78086b58b7f88bbdd2265eeedf698e598a5b4 Mon Sep 17 00:00:00 2001 From: GZ Date: Fri, 17 Jan 2025 16:05:44 -0800 Subject: [PATCH] Revert "chore: ensure docker file runs as non root user (#32976)" This reverts commit ddaad470c5da4ea85789dc53a27af58832ae0e1c. --- packages/@aws-cdk/aws-lambda-go-alpha/lib/Dockerfile | 3 --- packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile | 3 --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile | 2 -- 3 files changed, 8 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-go-alpha/lib/Dockerfile b/packages/@aws-cdk/aws-lambda-go-alpha/lib/Dockerfile index 8f0e2246c9164..e61969d408468 100644 --- a/packages/@aws-cdk/aws-lambda-go-alpha/lib/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-go-alpha/lib/Dockerfile @@ -12,7 +12,4 @@ ENV GOPROXY=direct RUN mkdir $GOPATH && \ chmod -R 777 $GOPATH -# Switch to a non-root user -USER nobody - CMD [ "go" ] diff --git a/packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile b/packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile index 3f9c63aeeced3..334b2a80ac4d9 100644 --- a/packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile @@ -36,7 +36,4 @@ RUN \ # Ensure no temporary files remain in the caches rm -rf /tmp/pip-cache/* /tmp/poetry-cache/* -# Switch to a non-root user -USER nobody - CMD [ "python" ] diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile index df00297843e25..005809616af08 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile @@ -47,6 +47,4 @@ RUN mkdir /tmp/bun-cache && \ chmod -R 777 /tmp/bun-cache && \ echo -e "[install.cache]\ndir = \"/tmp/bun-cache\"\ndisable = true" >> /home/user/.bunfig.toml -USER nobody - CMD [ "esbuild" ]