Modifying Dockerfile to test something.

This commit is contained in:
2025-03-09 01:44:29 +03:00
parent f7a8556409
commit c9d7a8f540

View File

@@ -1,6 +1,6 @@
FROM python:3.12.9-alpine3.21 # FROM python:3.12.9-alpine3.21
# FROM python:3.12-slim FROM python:3.12-slim
# Set environment variables # Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONDONTWRITEBYTECODE=1
@@ -15,19 +15,18 @@ WORKDIR /app
# build-essential \ # build-essential \
# && rm -rf /var/lib/apt/lists/* # && rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY files/requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Clone the Git repository # Clone the Git repository
RUN apt-get update && apt-get install -y git \ RUN apt-get update
RUN apt-get install -y git \
&& git clone https://gitea.abdulhade.com/abdulhade/db-middleware.git . \ && git clone https://gitea.abdulhade.com/abdulhade/db-middleware.git . \
&& apt-get remove -y git \ && apt-get remove -y git \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r files/requirements.txt
# Expose port 8080 for the FastAPI application # Expose port 8080 for the FastAPI application
EXPOSE 8080 EXPOSE 8080