mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
📦 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.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -6,16 +6,12 @@ ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
ENV TZ=Europe/Paris
|
||||
# Install git
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
# 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
|
||||
RUN git clone https://github.com/Paillat-dev/Botator.git
|
||||
WORKDIR /Botator
|
||||
COPY . .
|
||||
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
|
||||
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /Botator
|
||||
USER appuser
|
||||
CMD ["python", "main.py"]
|
||||
Reference in New Issue
Block a user