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:
Aaron Riedel 2022-03-06 09:01:34 +00:00
commit acf2276c49

View file

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