1.gitte地址
https://gitee.com/kekingcn/file-online-preview?_from=gitee_search
2.基础镜像打包
FROM ubuntu:20.04 MAINTAINER chenjh "[email protected]" # 内置一些常用的中文字体,避免普遍性乱码 COPY fonts/* /usr/share/fonts/chinese/ RUN apt-get clean && apt-get update &&\ sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list &&\ sed -i 's/# deb/deb/g' /etc/apt/sources.list &&\ apt-get install -y --reinstall ca-certificates &&\ apt-get clean && apt-get update &&\ 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 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,arm架构修改这一行就行 apt-get install -y libreoffice &&\ # 清理临时文件 rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\ cd /usr/share/fonts/chinese &&\ mkfontscale &&\ mkfontdir &&\ fc-cache -fv 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 ENV LANG zh_CN.UTF-8 ENV LC_ALL zh_CN.UTF-8 CMD ["/bin/bash"]
3.官方好像也提供了arm架构构建镜像的Dockerfile
https://gitee.com/kekingcn/file-online-preview/blob/master/docker/kkfileview-jdk/Dockerfile_arm64
标签:zh,file,get,apt,install,kekingcn,&&,online,usr From: https://www.cnblogs.com/wdgde/p/18005982