|
|
|
@ -2,28 +2,25 @@ FROM ubuntu:20.04
|
|
|
|
|
MAINTAINER chenjh "842761733@qq.com" |
|
|
|
|
# 内置一些常用的中文字体,避免普遍性乱码 |
|
|
|
|
COPY fonts/* /usr/share/fonts/chinese/ |
|
|
|
|
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 &&\ |
|
|
|
|
RUN sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list &&\ |
|
|
|
|
apt-get clean && apt-get update &&\ |
|
|
|
|
apt-get install -y locales && apt-get install -y language-pack-zh-hans &&\ |
|
|
|
|
apt-get install -y locales 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 &&\ |
|
|
|
|
export DEBIAN_FRONTEND=noninteractive &&\ |
|
|
|
|
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 &&\ |
|
|
|
|
apt-get install ttf-wqy-microhei &&\ |
|
|
|
|
apt-get install ttf-wqy-zenhei &&\ |
|
|
|
|
apt-get install xfonts-wqy &&\ |
|
|
|
|
apt-get install -y fontconfig ttf-mscorefonts-installer ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy &&\ |
|
|
|
|
apt-get install -y wget &&\ |
|
|
|
|
cd /tmp &&\ |
|
|
|
|
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/ &&\ |
|
|
|
|
|
|
|
|
|
# 安装 libreoffice |
|
|
|
|
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 &&\ |
|
|
|
|
# 安装 libreoffice |
|
|
|
|
apt-get install -y libxrender1 libxinerama1 libxt6 libxext-dev libfreetype6-dev libcairo2 libcups2 libx11-xcb1 libnss3 &&\ |
|
|
|
|
wget https://kkfileview.keking.cn/LibreOffice_7.3.7_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\ |
|
|
|
|
tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.3.7.2_Linux_x86-64_deb/DEBS &&\ |
|
|
|
|
dpkg -i *.deb &&\ |
|
|
|
|
|
|
|
|
|
# 清理临时文件 |
|
|
|
|
# 清理临时文件 |
|
|
|
|
rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\ |
|
|
|
|
cd /usr/share/fonts/chinese &&\ |
|
|
|
|
mkfontscale &&\ |
|
|
|
@ -35,4 +32,4 @@ ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
|
|
|
|
|
ENV PATH $PATH:$JAVA_HOME/bin |
|
|
|
|
ENV LANG zh_CN.UTF-8 |
|
|
|
|
ENV LC_ALL zh_CN.UTF-8 |
|
|
|
|
ENTRYPOINT ["java","-version"] |
|
|
|
|
CMD ["/bin/bash"] |
|
|
|
|