Dockerfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM ubuntu:latest
  2. LABEL maintainer="Jeremy Zheng"
  3. ENV DEBIAN_FRONTEND noninteractive
  4. RUN apt update
  5. RUN apt -y upgrade
  6. RUN apt install -y software-properties-common
  7. ENV PYTHON_VERSION "3.12"
  8. # https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
  9. RUN add-apt-repository -y ppa:deadsnakes/ppa
  10. RUN apt update
  11. RUN apt -y install build-essential \
  12. imagemagick ffmpeg fonts-dejavu-extra texlive-full pandoc \
  13. fonts-arphic-ukai fonts-arphic-uming \
  14. fonts-noto-cjk fonts-noto-cjk-extra \
  15. fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp \
  16. fonts-wqy-microhei fonts-wqy-zenhei \
  17. fonts-cns11643-kai fonts-cns11643-sung \
  18. fonts-moe-standard-kai fonts-moe-standard-song \
  19. fonts-ipafont-nonfree-jisx0208 \
  20. python${PYTHON_VERSION}-full python${PYTHON_VERSION}-dev \
  21. libpq5
  22. RUN apt -y clean
  23. RUN mkdir /opt/lily
  24. # https://pip.pypa.io/en/stable/installation/
  25. RUN bash -c "python${PYTHON_VERSION} -m venv $HOME/python3 \
  26. && . $HOME/python3/bin/activate \
  27. && pip install --upgrade pip \
  28. && pip install cmake \
  29. psycopg minio redis[hiredis] \
  30. pika msgpack matplotlib ebooklib \
  31. grpcio protobuf grpcio-health-checking \
  32. pandas openpyxl xlrd pyxlsb"
  33. RUN echo 'source $HOME/python3/bin/activate' >> $HOME/.bashrc
  34. COPY lily /opt/lily/
  35. COPY config.toml /etc/lily.toml
  36. RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
  37. WORKDIR /opt/lily
  38. CMD ["/bin/bash", "-l"]