Files
Botator/Dockerfile
Paillat c0d6b3f2d5 📦 chore(.dockerignore): add .env and .git to the Docker ignore list
🐳 chore(Dockerfile): remove unnecessary installation of git and update Dockerfile to copy files instead of cloning repository
The .env and .git files are now added to the .dockerignore file to prevent them from being included in the Docker image. This is done to ensure that sensitive information and version control files are not included in the image.
In the Dockerfile, the installation of git has been removed as it is no longer needed. Instead of cloning the repository, the Dockerfile now copies the required files directly. This improves the build process by reducing unnecessary steps and dependencies.
2023-10-31 12:56:47 +01:00

17 lines
581 B
Docker

# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.11-bookworm
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Turns off pyc files
ENV PYTHONDONTWRITEBYTECODE=1
ENV TZ=Europe/Paris
# Install pip requirements
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /Botator
WORKDIR /Botator
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
USER appuser
CMD ["python", "main.py"]