Dockerfile 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Template
  2. FROM python:3.8-slim-buster as main
  3. # Tell Hikka, that it's running docker
  4. # Currently it's used only in .info badge
  5. ENV DOCKER=true
  6. # Suppress weird gitpython error
  7. ENV GIT_PYTHON_REFRESH=quiet
  8. # Do not user pip cache dir
  9. ENV PIP_NO_CACHE_DIR=1
  10. # Install mandatory apt packages
  11. RUN apt update && apt install \
  12. libcairo2 git -y --no-install-recommends
  13. # Clean the cache
  14. RUN rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp/*
  15. # Clone the repo
  16. RUN git clone https://github.com/hikariatama/Hikka /Hikka
  17. # Change working directory
  18. WORKDIR /Hikka
  19. # Install mandatory pip requirements
  20. RUN pip install \
  21. --no-warn-script-location \
  22. --no-cache-dir \
  23. -r requirements.txt
  24. # Expose IP address
  25. EXPOSE 8080
  26. # Create data dir
  27. RUN mkdir /data
  28. # Run Hikka
  29. CMD ["python3", "-m", "hikka"]