From 72fad9e557e571faa1092c26849f25224c2a3ca9 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Thu, 27 Oct 2022 16:36:33 +0200 Subject: [PATCH] add user to Dockerfile --- python/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/Dockerfile b/python/Dockerfile index ab94e88..ae872d9 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -1,9 +1,17 @@ -FROM python:3-slim +FROM python:3.11.0-slim ENV PYTHONUNBUFFERED 1 +RUN useradd -s /bin/bash -m me && \ + groupadd app && \ + usermod -aG app me + WORKDIR /src +RUN apt-get update && \ + apt-get upgrade -y && \ + rm -rf /var/lib/apt/lists/* + COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt