Do not run the container as root
This commit is contained in:
parent
74425995f7
commit
20437c4899
1 changed files with 7 additions and 3 deletions
10
Dockerfile
10
Dockerfile
|
@ -1,10 +1,14 @@
|
|||
FROM python:slim
|
||||
|
||||
WORKDIR ./
|
||||
ARG PUID=1000
|
||||
ENV USER docker
|
||||
ENV HOMEDIR "/home/${USER}"
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN useradd -u "${PUID}" -m "${USER}"
|
||||
USER ${USER}
|
||||
WORKDIR ${HOMEDIR}
|
||||
COPY . .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD [ "python", "./bot.py" ]
|
Loading…
Reference in a new issue