# Pull base image FROM python:3.12-alpine WORKDIR /app RUN apk add --no-cache \ build-base \ curl \ && adduser -D python \ && mkdir -p /app \ && chown python:python /app USER python COPY --chown=python:python requirements*.txt ./ RUN pip install -r requirements.txt \ && pip install -r requirements_dev.txt COPY --chown=python:python . . ENV DEBUG="${DEBUG}" \ PYTHONUNBUFFERED="true" \ PATH="${PATH}:/home/python/.local/bin" \ USER="python" # Collect static files RUN SECRET_KEY=nothing python manage.py collectstatic --no-input CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]