2022-11-27 16:02:54 +01:00
|
|
|
# For more information, please refer to https://aka.ms/vscode-docker-python
|
2023-09-05 09:40:48 +02:00
|
|
|
FROM python:3.10.13-slim-bullseye
|
2022-11-27 16:02:54 +01:00
|
|
|
# Keeps Python from generating .pyc files in the container
|
|
|
|
|
# Turns off buffering for easier container logging
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
# Install pip requirements
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install -r requirements.txt
|
2023-05-05 12:38:59 +02:00
|
|
|
RUN git clone https://github.com/Paillat-dev/Botator.git
|
2023-07-16 20:48:07 +02:00
|
|
|
WORKDIR /Botator
|
2022-11-27 16:02:54 +01:00
|
|
|
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
2023-07-16 20:48:07 +02:00
|
|
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /Botator
|
2022-11-27 16:02:54 +01:00
|
|
|
USER appuser
|
2023-07-15 12:20:38 +02:00
|
|
|
CMD ["python", "main.py"]
|