Dockerfile 839 B

1234567891011121314151617181920212223242526272829303132
  1. # Build from repository root: docker compose build backend
  2. FROM python:3.11-bookworm
  3. ENV PYTHONDONTWRITEBYTECODE=1 \
  4. PYTHONUNBUFFERED=1 \
  5. PIP_NO_CACHE_DIR=1 \
  6. FLASK_RUN_HOST=0.0.0.0 \
  7. FLASK_RUN_PORT=5000
  8. WORKDIR /app
  9. RUN apt-get update && apt-get install -y --no-install-recommends \
  10. default-mysql-client \
  11. ffmpeg \
  12. libglib2.0-0 \
  13. libgl1 \
  14. libgomp1 \
  15. libsm6 \
  16. libxext6 \
  17. libxrender1 \
  18. && rm -rf /var/lib/apt/lists/*
  19. COPY BridgeDiseaseBackend-main/requirements.txt .
  20. RUN pip install --upgrade pip && pip install -r requirements.txt
  21. COPY BridgeDiseaseBackend-main/ /app/
  22. COPY docker/backend/bootstrap.py /app/docker_bootstrap.py
  23. COPY docker/backend/entrypoint.sh /entrypoint.sh
  24. RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
  25. EXPOSE 5000
  26. ENTRYPOINT ["/entrypoint.sh"]