DocHub 程序是开源免费的,不存在,所以没有所谓的售后,所以凡是遇到问题,请到GitHub或者Gitee提交issues,以便问题存档以及在有空的时候查看和排查,不接受除此之外的任何答疑求助。每天上班要工作,下班要生活、休闲、学习以及对开源项目做改进和优化…请理解和见谅,谢谢。

使用 Docker 安装部署 DocHub 文库系统

如果您使用 Docker 进行部署,我也默认您对 Docker 也算比较熟悉…

Dockerfile

  1. FROM ubuntu:16.04
  2. MAINTAINER "TruthHun <TruthHun@QQ.COM>"
  3. # 阿里云源设置
  4. RUN echo "deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse "\
  5. "\ndeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse "\
  6. "\ndeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse "\
  7. "\ndeb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse "\
  8. "\ndeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse "\
  9. "\ndeb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse "\
  10. "\ndeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse "\
  11. "\ndeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse "\
  12. "\ndeb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse "\
  13. "\ndeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse" > /etc/apt/sources.list
  14. # 安装字符编码支持
  15. RUN apt update -y && apt install -y locales && rm -rf /var/lib/apt/lists/* \
  16. && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
  17. ENV LANG en_US.utf8
  18. # 安装中文字体支持等相关依赖
  19. RUN apt update -y && apt install -y fonts-wqy-zenhei fonts-wqy-microhei wget libreoffice imagemagick pdf2svg poppler-utils xdg-utils wget xz-utils python \
  20. && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
  21. # 下载并解压 DocHub 程序
  22. RUN mkdir -p /www/dochub && wget https://github.com/TruthHun/DocHub/releases/download/v2.3/DocHub.V2.3_linux_amd64.tar.gz && tar -xvf DocHub.V2.3_linux_amd64.tar.gz -C /www/dochub && rm DocHub.V2.3_linux_amd64.tar.gz
  23. RUN chmod 0777 -R /www/dochub
  24. EXPOSE 8090
  25. VOLUME /www/dochub
  26. WORKDIR /www/dochub
  27. CMD [ "./DocHub" ]

创建镜像

  1. [sudo] docker build -t truthhun/dochub:v2.3 .

运行容器

  1. [sudo] docker run -d -p 8090:8090 --name dochub-v2.3 truthhun/dochub:v2.3