# Use the official Python image with version 3.11 FROM python:3.11 # Set environment variables for Python and unbuffered mode ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 # RUN addgroup --system app && adduser --system --group app # Set the working directory to /app ENV APP_HOME=/app WORKDIR $APP_HOME # Install deb pkgs for usb RUN apt-get update RUN apt-get install ffmpeg libsm6 libxext6 -y # Install dependencies COPY requirements.txt /app/ RUN pip install --upgrade pip && pip install -r requirements.txt # Copy the current directory contents into the container at /app COPY . $APP_HOME/ # Expose the port that Gunicorn will run on EXPOSE 8000 # RUN python manage.py collectstatic -y # RUN python manage.py makemigrations # RUN python manage.py migrate CMD ["bash", "./docker-entrypoint.sh"]