DockerfileBack 2.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FROM ubuntu:20.04
  2. MAINTAINER chenjh "842761733@qq.com"
  3. # 内置一些常用的中文字体,避免普遍性乱码
  4. EXPOSE 8012
  5. RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse" > /etc/apt/sources.list &&\
  6. apt-get clean && apt-get update &&\
  7. apt-get install -y --reinstall ca-certificates &&\
  8. apt-get clean && apt-get update &&\
  9. apt-get install -y locales language-pack-zh-hans &&\
  10. localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && locale-gen zh_CN.UTF-8 &&\
  11. export DEBIAN_FRONTEND=noninteractive &&\
  12. apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
  13. apt-get install -y fontconfig ttf-mscorefonts-installer ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\
  14. apt-get install -y wget &&\
  15. cd /tmp &&\
  16. # 安装 libreoffice
  17. # apt-get install -y libxrender1 libxinerama1 libxt6 libxext-dev libfreetype6-dev libcairo2 libcups2 libx11-xcb1 libnss3 &&\
  18. # wget https://downloadarchive.documentfoundation.org/libreoffice/old/7.5.3.2/deb/x86_64/LibreOffice_7.5.3.2_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\
  19. # tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.5.3.2_Linux_x86-64_deb/DEBS &&\
  20. # dpkg -i *.deb &&\
  21. # 清理临时文件
  22. rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
  23. ENV JAVA_HOME /usr/local/jdk1.8.0_251
  24. ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
  25. ENV PATH $PATH:$JAVA_HOME/bin
  26. ENV LANG zh_CN.UTF-8
  27. ENV LC_ALL zh_CN.UTF-8
  28. CMD ["/bin/bash"]
  29. COPY server/target/kkFileView-4.4.0-SNAPSHOT.jar file-preview.jar
  30. EXPOSE 8012