Dockerfile 576 B

12345678910111213141516171819202122232425262728
  1. # ---------- BUILD STAGE ----------
  2. FROM python:3.14-alpine AS builder
  3. RUN apk add --no-cache build-base mariadb-connector-c-dev
  4. WORKDIR /build
  5. COPY requirements.txt .
  6. RUN pip install --prefix=/install -r requirements.txt
  7. # ---------- RUNTIME STAGE ----------
  8. FROM python:3.14-alpine
  9. RUN python3 -m pip uninstall pip -y
  10. RUN apk add mariadb-connector-c
  11. COPY --from=builder /install /usr/local
  12. WORKDIR /opt/MyAnimeBot
  13. COPY . .
  14. RUN chown -R 0:0 /opt/MyAnimeBot && chmod -R g+rw /opt/MyAnimeBot
  15. EXPOSE 15200
  16. CMD ["python", "myanimebot.py"]