FROM linuxserver/libreoffice:arm64v8-latest USER root WORKDIR /mnt # 设置环境变量 ENV LANG=zh_CN.UTF-8 ENV LC_ALL=zh_CN.UTF-8 ENV LANGUAGE=zh_CN.UTF-8 ENV TZ=Asia/Shanghai ENV JAVA_OPTS="-Xmx1024M -Xms1024M -Xmn768M -XX:MaxMetaspaceSize=256M -XX:MetaspaceSize=256M" ENV APP_ACTIVE="prod" ENV BOOT_CONFIG="" VOLUME ["/mnt/logs","/mnt/storage","/mnt/jar"] # 复制字体文件 COPY jar /mnt/jar COPY libreoffice/fonts /usr/share/fonts/libreoffice ## 更改文件所有者 #RUN chown -R root:root /usr/share/fonts/libreoffice # ## 设置字体权限 #RUN chmod -R 777 /usr/share/fonts/libreoffice # 生成字体缓存 RUN fc-cache -fv EXPOSE 8012 # 设置入口点 ENTRYPOINT nohup java -server ${JAVA_OPTS} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=${APP_ACTIVE} -jar /mnt/jar/officeOnlineShow.jar ${BOOT_CONFIG}