From 50b1ae95b93d18573de507267fb6eb0e9983b49d Mon Sep 17 00:00:00 2001 From: "Brandon Waterloo [MSFT]" <36966225+bwateratmsft@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:32:50 -0400 Subject: [PATCH] Update Python Dockerfile template to use explicit UID --- resources/templates/python/Dockerfile.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/python/Dockerfile.template b/resources/templates/python/Dockerfile.template index 7f42534fe3..fa0251a305 100644 --- a/resources/templates/python/Dockerfile.template +++ b/resources/templates/python/Dockerfile.template @@ -25,9 +25,9 @@ WORKDIR /app COPY . /app {{#unless (isRootPort ports)}} -# Creates a non-root user and adds permission to access the /app folder +# Creates a non-root user with an explicit UID and adds permission to access the /app folder # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers -RUN useradd appuser && chown -R appuser /app +RUN useradd -u 5678 appuser && chown -R appuser /app USER appuser {{/unless}}