mirror of
https://github.com/rjNemo/docker_examples
synced 2026-06-11 04:46:39 +00:00
add user to Dockerfile
This commit is contained in:
parent
7ea01d1d00
commit
72fad9e557
1 changed files with 9 additions and 1 deletions
|
|
@ -1,9 +1,17 @@
|
||||||
FROM python:3-slim
|
FROM python:3.11.0-slim
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
RUN useradd -s /bin/bash -m me && \
|
||||||
|
groupadd app && \
|
||||||
|
usermod -aG app me
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue