Dockerfile 416 B

123456789101112131415161718192021
  1. # syntax=docker/dockerfile:1
  2. FROM python:3-slim-bullseye
  3. ENV PYTHONDONTWRITEBYTECODE=1
  4. ENV PYTHONUNBUFFERED=1
  5. WORKDIR /app
  6. RUN apt-get update && \
  7. apt-get install -y libmariadb-dev gcc nginx
  8. COPY ./requirements.txt /app/
  9. ARG CACHEBUST
  10. RUN pip install -r requirements.txt && apt-get purge -y libmariadb-dev gcc
  11. COPY . /app/
  12. RUN python manage.py collectstatic --noinput
  13. EXPOSE 8000
  14. CMD ["/app/production.sh"]