4 Star 24 Fork 6

Datheng Wang/ kkFileView-Wife

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
Datheng Wang 提交于 2019-01-09 08:50 . fix permission on mv.
FROM ubuntu:18.04
MAINTAINER Maosheng Wang <[email protected]>
# chinese support
RUN apt-get update && \
apt-get install -y language-pack-zh* && \
apt-get install -y chinese* && \
apt-get install -y fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core && \
apt-get install -y ttf-wqy-microhei ttf-wqy-zenhei && \
apt-get install -y ttf-mscorefonts-installer
# Set the locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# java-with-apt-get-on-ubuntu-18-04
RUN apt-get update && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y ant && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer;
# Fix certificate issues, found as of
# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/983302
RUN apt-get update && \
apt-get install -y ca-certificates-java && \
apt-get clean && \
update-ca-certificates -f && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer;
# Setup JAVA_HOME, this is useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
# install maven, git and build kk-fileview
RUN apt-get update -y && \
apt install -y maven && \
apt install -y git && \
git clone -b prod https://gitee.com/datheng/file-online-preview.git && \
cd file-online-preview && \
mvn package -DskipTests && \
mv jodconverter-web/target/*.jar / && \
cd / && \
rm -rf file-online-preview
# Install wget
RUN apt-get update -y && \
apt-get install -y wget
# Install OpenOffice
RUN wget https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.6/binaries/zh-CN/Apache_OpenOffice_4.1.6_Linux_x86-64_install-deb_zh-CN.tar.gz
RUN tar -xvf Apache_OpenOffice*.tar.gz
RUN dpkg -i zh-CN/DEBS/*.deb
RUN dpkg -i zh-CN/DEBS/desktop-integration/*.deb
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
filepreview_SLEEP=0 \
JAVA_OPTS=""
# Add a filepreview user to run our application so that it doesn't need to run as root
RUN useradd -d /home/filepreview -ms /bin/bash -g root -G sudo -p filepreview filepreview
USER filepreview
WORKDIR /home/filepreview
ADD entrypoint.sh entrypoint.sh
USER root
RUN chmod 755 entrypoint.sh && chown filepreview:root entrypoint.sh
RUN mv /*.jar app.jar
# Copy fonts
ADD fallback /usr/share/fonts/
USER filepreview
RUN mkdir -p /home/filepreview/file-preview/convertedFile/demo/
EXPOSE 8012 8012/udp
ENTRYPOINT ["./entrypoint.sh"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/datheng/kkFileView-Wife.git
[email protected]:datheng/kkFileView-Wife.git
datheng
kkFileView-Wife
kkFileView-Wife
master

搜索帮助