2020-06-09 16:22:00 +08:00
|
|
|
FROM ubuntu:20.04
|
2019-06-17 18:13:34 +08:00
|
|
|
MAINTAINER chenjh "842761733@qq.com"
|
2020-12-26 17:34:59 +08:00
|
|
|
ADD server/target/kkFileView-*.tar.gz /opt/
|
2021-06-25 10:43:01 +08:00
|
|
|
COPY fonts/* /usr/share/fonts/chinese/
|
2020-06-09 16:22:00 +08:00
|
|
|
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 &&\
|
|
|
|
apt-get clean && apt-get update &&\
|
|
|
|
apt-get install -y locales && apt-get install -y language-pack-zh-hans &&\
|
|
|
|
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && locale-gen zh_CN.UTF-8 &&\
|
2021-12-07 16:11:50 +08:00
|
|
|
export DEBIAN_FRONTEND=noninteractive &&\
|
2020-06-09 16:22:00 +08:00
|
|
|
apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
|
|
|
|
apt-get install -y libxrender1 && apt-get install -y libxt6 && apt-get install -y libxext-dev && apt-get install -y libfreetype6-dev &&\
|
|
|
|
apt-get install -y wget && apt-get install -y ttf-mscorefonts-installer && apt-get install -y fontconfig &&\
|
2020-08-17 11:58:46 +08:00
|
|
|
apt-get install ttf-wqy-microhei &&\
|
|
|
|
apt-get install ttf-wqy-zenhei &&\
|
|
|
|
apt-get install xfonts-wqy &&\
|
|
|
|
cd /tmp &&\
|
2020-06-09 16:22:00 +08:00
|
|
|
wget https://kkfileview.keking.cn/server-jre-8u251-linux-x64.tar.gz &&\
|
|
|
|
tar -zxf /tmp/server-jre-8u251-linux-x64.tar.gz && mv /tmp/jdk1.8.0_251 /usr/local/ &&\
|
2021-05-27 21:14:09 +08:00
|
|
|
|
|
|
|
# 安装 OpenOffice
|
2021-06-23 10:26:22 +08:00
|
|
|
# wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-deb_zh-CN.tar.gz -cO openoffice_deb.tar.gz &&\
|
|
|
|
# tar -zxf /tmp/openoffice_deb.tar.gz && cd /tmp/zh-CN/DEBS &&\
|
|
|
|
# dpkg -i *.deb && dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.6-9790_all.deb &&\
|
2021-05-27 21:14:09 +08:00
|
|
|
|
|
|
|
# 安装 libreoffice
|
2021-06-23 10:26:22 +08:00
|
|
|
apt-get install -y libxinerama1 libcairo2 libcups2 libx11-xcb1 &&\
|
|
|
|
wget https://kkfileview.keking.cn/LibreOffice_7.1.4_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\
|
|
|
|
tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb/DEBS &&\
|
|
|
|
dpkg -i *.deb &&\
|
2021-05-27 21:14:09 +08:00
|
|
|
|
2020-06-09 16:22:00 +08:00
|
|
|
rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
|
2021-06-25 10:43:01 +08:00
|
|
|
cd /usr/share/fonts/chinese &&\
|
2020-05-18 14:10:19 +08:00
|
|
|
mkfontscale &&\
|
|
|
|
mkfontdir &&\
|
|
|
|
fc-cache -fv
|
2020-06-09 16:22:00 +08:00
|
|
|
ENV JAVA_HOME /usr/local/jdk1.8.0_251
|
|
|
|
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
|
|
|
|
ENV PATH $PATH:$JAVA_HOME/bin
|
2019-08-02 13:46:22 +08:00
|
|
|
ENV LANG zh_CN.UTF-8
|
2019-06-17 18:13:34 +08:00
|
|
|
ENV LC_ALL zh_CN.UTF-8
|
2021-12-07 16:11:50 +08:00
|
|
|
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.1.0-SNAPSHOT/bin
|
|
|
|
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.1.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar"]
|