From a78f1e5f8ef991dd153d23dcfc41a5e3f77a7244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Wed, 19 Jun 2019 14:14:57 +0800 Subject: [PATCH] =?UTF-8?q?Docker=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 +- .../src/main/bin/docker-startup.sh | 29 ------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 jodconverter-web/src/main/bin/docker-startup.sh diff --git a/Dockerfile b/Dockerfile index 6f525385..ffc26ea7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,5 @@ RUN yum install -y kde-l10n-Chinese &&\ mkfontdir &&\ fc-cache -fv ENV LC_ALL zh_CN.UTF-8 -CMD sh /opt/kkFileView-2.1.0-SNAPSHOT/bin/docker-startup.sh \ No newline at end of file +ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-2.1.0-SNAPSHOT/bin +ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-2.1.0-SNAPSHOT/conf/application.properties","-jar","/opt/kkFileView-2.1.0-SNAPSHOT/bin/kkFileView-2.1.0-SNAPSHOT.jar"] \ No newline at end of file diff --git a/jodconverter-web/src/main/bin/docker-startup.sh b/jodconverter-web/src/main/bin/docker-startup.sh deleted file mode 100644 index 03fb6955..00000000 --- a/jodconverter-web/src/main/bin/docker-startup.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice") -FLAG= -OFFICE_HOME= -KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")";pwd) -export KKFILEVIEW_BIN_FOLDER=$KKFILEVIEW_BIN_FOLDER -cd $KKFILEVIEW_BIN_FOLDER -echo "Using KKFILEVIEW_BIN_FOLDER $KKFILEVIEW_BIN_FOLDER" -grep 'office\.home' ../conf/application.properties | grep '!^#' -if [ $? -eq 0 ]; then - echo "Using customized office.home" -else - for i in ${DIR_HOME[@]} - do - if [ -f $i"/program/soffice.bin" ]; then - FLAG=true - OFFICE_HOME=${i} - break - fi - done - if [ ! -n "${FLAG}" ]; then - echo "Installing OpenOffice" - sh ../script/install.sh - else - echo "Detected office component has been installed in $OFFICE_HOME" - fi -fi -echo "Starting kkFileView..." -java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../conf/application.properties -jar kkFileView-2.1.0-SNAPSHOT.jar \ No newline at end of file