2022-11-27 16:02:54 +01:00
|
|
|
# For more information, please refer to https://aka.ms/vscode-docker-python
|
2023-10-31 12:54:17 +01:00
|
|
|
FROM python:3.11-bookworm
|
2022-11-27 16:02:54 +01:00
|
|
|
# Turns off buffering for easier container logging
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
2023-10-31 12:54:17 +01:00
|
|
|
# Turns off pyc files
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
|
|
2022-11-27 16:02:54 +01:00
|
|
|
# Install pip requirements
|
2023-10-31 12:56:47 +01:00
|
|
|
WORKDIR /Botator
|
2023-10-31 12:59:12 +01:00
|
|
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /Botator
|
2022-11-27 16:02:54 +01:00
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install -r requirements.txt
|
2023-10-31 12:56:47 +01:00
|
|
|
COPY . .
|
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
|
|
|
|
|
USER appuser
|
2023-07-15 12:20:38 +02:00
|
|
|
CMD ["python", "main.py"]
|