Merge branch 'debug/container-privileges' into 'master'
Do not run the container as root See merge request aaron-riedel/shbot!8
This commit is contained in:
commit
acf2276c49
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