add user to Dockerfile

This commit is contained in:
Ruidy 2022-10-27 16:36:33 +02:00
parent 7ea01d1d00
commit 72fad9e557
No known key found for this signature in database
GPG key ID: C340FC6A22B0DA40

View file

@ -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