mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
🐳 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.
17 lines
581 B
Docker
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"] |