Bladeren bron

2.2.1迭代,docker镜像底层使用ubuntu

陈精华 5 jaren geleden
bovenliggende
commit
7c4fc42247

+ 4 - 15
.gitignore

@@ -24,19 +24,8 @@ nbdist/
 .nb-gradle/
 /*.iml
 
-**/target/
-.classpath
-.project
-**/.settings
-**/build/
-**/.externalToolBuilders/
-*.iml
-**/.idea/
-**/disconf
-**/rpc.properties
-/producer/tmp
-/.temfile
-.temfile
-convertedFile/
+### VS Code ###
+.vscode/
+
 jodconverter-web/src/main/cache/
-jodconverter-web/src/main/file/
+jodconverter-web/src/main/file/

File diff suppressed because it is too large
+ 0 - 18412
0001-maven-pdf.js-bcmap-pdf.js-2.4.567.patch


+ 20 - 29
Dockerfile

@@ -1,38 +1,29 @@
-FROM centos:centos7.6.1810
+FROM ubuntu:20.04
 MAINTAINER chenjh "842761733@qq.com"
 ADD jodconverter-web/target/kkFileView-*.tar.gz /opt/
 COPY fonts/* /usr/share/fonts/chienes/
-RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup &&\
-    curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo &&\
-    sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo &&\
-    yum makecache &&\
-    yum install -y kde-l10n-Chinese &&\
-    yum install -y glibc-common &&\
-    yum install -y fontconfig &&\
-    yum install -y mkfontscale &&\
-    localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 &&\
-    echo "LANG=zh_CN.UTF-8" > /etc/locale.conf &&\
-    source /etc/locale.conf &&\
-    export LANG=zh_CN.UTF-8 &&\
-    LANG="zh_CN.UTF-8" &&\
-    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
-    yum install -y java-1.8.0-openjdk.x86_64 &&\
-    yum install -y wget &&\
-    yum install -y libXext.x86_64 &&\
-    yum groupinstall -y  "X Window System" &&\
-    cd /tmp &&\
-    wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz -cO openoffice_rpm.tar.gz &&\
-    tar zxf /tmp/openoffice_rpm.tar.gz &&\
-    cd /tmp/zh-CN/RPMS &&\
-    rpm -Uvih *.rpm &&\
-    rpm -Uvih desktop-integration/openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm &&\
-    rm -f /tmp/openoffice_rpm.tar.gz &&\
-    rm -rf /tmp/zh-CN &&\
+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 &&\
+	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 &&\
+	cd /tmp &&\
+	wget https://kkfileview.keking.cn/server-jre-8u251-linux-x64.tar.gz &&\
+	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/server-jre-8u251-linux-x64.tar.gz && mv /tmp/jdk1.8.0_251 /usr/local/ &&\
+	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 &&\
+	rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
     cd /usr/share/fonts/chienes &&\
     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
-ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-2.2.0/bin
-ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-2.2.0/config/application.properties","-jar","/opt/kkFileView-2.2.0/bin/kkFileView-2.2.0.jar"]
+ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-2.2.1-SNAPSHOT/bin
+ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-2.2.1-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-2.2.1-SNAPSHOT/bin/kkFileView-2.2.1-SNAPSHOT.jar"]

+ 1 - 1
jodconverter-web/pom.xml

@@ -12,7 +12,7 @@
 
     <groupId>cn.keking</groupId>
     <artifactId>kkFileView</artifactId>
-    <version>2.2.0</version>
+    <version>2.2.1-SNAPSHOT</version>
 
 
     <properties>

+ 4 - 0
jodconverter-web/src/main/bin/install.sh

@@ -19,6 +19,10 @@ install_ubuntu() {
    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
    echo $?
  if [ $? -eq 0 ];then
+     apt-get install -y libxrender1
+     apt-get install -y libxt6
+     apt-get install -y libxext-dev
+     apt-get install -y libfreetype6-dev
      dpkg -i *.deb
      echo 'install desktop service ...'
      dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.6-9790_all.deb

+ 1 - 1
jodconverter-web/src/main/bin/startup.bat

@@ -6,4 +6,4 @@ echo Starting kkFileView...
 echo Please check log file in ../log/kkFileView.log for more information
 echo You can get help in our official homesite: https://kkFileView.keking.cn
 echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers
-java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=..\config\application.properties -jar kkFileView-2.2.0.jar -> ..\log\kkFileView.log
+java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=..\config\application.properties -jar kkFileView-2.2.1-SNAPSHOT.jar -> ..\log\kkFileView.log

+ 1 - 1
jodconverter-web/src/main/bin/startup.sh

@@ -29,4 +29,4 @@ echo "Starting kkFileView..."
 echo "Please execute ./showlog.sh to check log for more information"
 echo "You can get help in our official homesite: https://kkFileView.keking.cn"
 echo "If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers"
-nohup java -Dfile.encoding=UTF-8 -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../config/application.properties -jar kkFileView-2.2.0.jar > ../log/kkFileView.log 2>&1 &
+nohup java -Dfile.encoding=UTF-8 -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../config/application.properties -jar kkFileView-2.2.1-SNAPSHOT.jar > ../log/kkFileView.log 2>&1 &

+ 1 - 1
pom.xml

@@ -5,7 +5,7 @@
 
     <groupId>cn.keking</groupId>
     <artifactId>filepreview</artifactId>
-    <version>2.2.0</version>
+    <version>2.2.1-SNAPSHOT</version>
     <modules>
         <module>jodconverter-core</module>
         <module>jodconverter-web</module>

Some files were not shown because too many files changed in this diff