Created
September 9, 2022 15:04
-
-
Save aoirint/55d16f25be4145b426df6bab10cc8a59 to your computer and use it in GitHub Desktop.
Python General User Dockerfile (Debian)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.9 | |
ARG DEBIAN_FRONTEND=noninteractive | |
ENV PYTHONUNBUFFERED=1 | |
ENV PATH=/home/user/.local/bin:${PATH} | |
RUN apt-get update && \ | |
apt-get install -y \ | |
gosu && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN groupadd --non-unique --gid 1000 user && \ | |
useradd --non-unique --uid 1000 --gid 1000 --create-home user | |
ADD requirements.txt / | |
RUN gosu user pip3 install -r /requirements.txt | |
WORKDIR /code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment