| 1 |
FROM python:3.12-slim |
| 2 |
|
| 3 |
WORKDIR /app |
| 4 |
|
| 5 |
# Install system dependencies required for dev environment |
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 7 |
git \ |
| 8 |
build-essential \ |
| 9 |
&& rm -rf /var/lib/apt/lists/* |
| 10 |
|
| 11 |
# Copy the requirements file first to cache it |
| 12 |
COPY requirements.txt requirements_dev.txt requirements_test.txt ./ |
| 13 |
|
| 14 |
# Upgrade pip and install dependencies |
| 15 |
RUN pip install --upgrade pip && \ |
| 16 |
pip install -r requirements.txt && \ |
| 17 |
pip install -r requirements_dev.txt && \ |
| 18 |
pip install -r requirements_test.txt |
| 19 |
|
| 20 |
# Do not copy project files here, we will mount them via docker-compose |
| 21 |
# Keep the container running for dev usage |
| 22 |
CMD ["tail", "-f", "/dev/null"] |