diff options
Diffstat (limited to 'activiti-extension/src/main/docker')
-rw-r--r-- | activiti-extension/src/main/docker/Dockerfile | 8 | ||||
-rw-r--r-- | activiti-extension/src/main/docker/activiti-docker-build_image.sh | 21 | ||||
-rw-r--r-- | activiti-extension/src/main/docker/bin/entrypoint.sh | 19 |
3 files changed, 38 insertions, 10 deletions
diff --git a/activiti-extension/src/main/docker/Dockerfile b/activiti-extension/src/main/docker/Dockerfile index 129e249..23607b3 100644 --- a/activiti-extension/src/main/docker/Dockerfile +++ b/activiti-extension/src/main/docker/Dockerfile @@ -1,15 +1,15 @@ FROM openjdk:8-jre-alpine -LABEL User=Zhaoxing(mzhx.meng@gmail.com) +LABEL maintainer=Zhaoxing(mzhx.meng@gmail.com) +ENV OPENPALETTE_MSB_IP=127.0.0.1 OPENPALETTE_MSB_PORT=80 SCHEMA_UPDATE_INIT=false WORKDIR /home/onap/workflow/wfengineactiviti EXPOSE 8080 -ENV OPENPALETTE_MSB_IP=127.0.0.1 OPENPALETTE_MSB_PORT=80 SCHEMA_UPDATE_INIT=false ADD apache-tomcat /home/onap/workflow/wfengineactiviti/ RUN chmod 755 /home/onap/workflow/wfengineactiviti/bin/*.sh -CMD ["/home/onap/workflow/wfengineactiviti/bin/startup.sh"] - +ENTRYPOINT ["./bin/entrypoint.sh"] +CMD ["start"] diff --git a/activiti-extension/src/main/docker/activiti-docker-build_image.sh b/activiti-extension/src/main/docker/activiti-docker-build_image.sh index bc53fbd..7b81493 100644 --- a/activiti-extension/src/main/docker/activiti-docker-build_image.sh +++ b/activiti-extension/src/main/docker/activiti-docker-build_image.sh @@ -46,33 +46,42 @@ if [ $https_proxy ]; then fi echo "CURLPROXY=${CURLPROXY}" +rm -Rf activiti-5.2.0/ +rm -Rf apache-tomcat/ +rm -Rf temp/ +#rm -Rf activiti-extension*.jar +rm -Rf activiti-rest.war + + echo "download Tomcat 8.5.20" #curl "${CURLPROXY}" -m 300 -O -J -L "http://mirrors.shuosc.org/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz" -wget "http://mirrors.shuosc.org/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz" +#wget "http://mirrors.shuosc.org/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz" tar -zxf apache-tomcat-8.5.20.tar.gz mv apache-tomcat-8.5.20 apache-tomcat echo "download Activiti 5.22.0" -wget "https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip" +#wget "https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip" #curl "${CURLPROXY}" -m 600 -O -J -L "https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip" rm -Rf ./activiti-5.22.0/ #sudo apt-get install p7zip-full #7za x activiti-5.22.0.zip -unzip -o -q activiti-5.22.0.zip -#unzip -o -q activiti-5.22.0.zip "activiti-5.22.0/wars/activiti-rest.war" -d ./ +#unzip -o -q activiti-5.22.0.zip +unzip -o -q activiti-5.22.0.zip "activiti-5.22.0/wars/activiti-rest.war" -d ./ mv activiti-5.22.0/wars/activiti-rest.war . echo "download activiti-extension ${VERSION}" #curl "${CURLPROXY}" -m 600 -O -J -L "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" -wget --output-file=activiti-extension.jar "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" +#wget -O activiti-extension.jar "https://nexus.onap.org/service/local/artifact/maven/content?r=${NEXUSREPONAME}&g=org.onap.vfc.nfvo.wfengine&a=activiti-extension&e=jar&v=${VERSION}" rm -Rf ./temp/ mkdir -p ./temp/WEB-INF/lib/ cp -f activiti-extension*.jar ./temp/WEB-INF/lib/activiti-extension.jar echo "update activiti-rest.war" -$JAVA_HOME/bin/jar uvf activiti-rest.war -C ./temp . >/dev/null 2>&1 +$JAVA_HOME/bin/jar -uvf activiti-rest.war -C ./temp/ ./ +#. >/dev/null 2>&1 -C ./temp cp activiti-rest.war ./apache-tomcat/webapps/ +cp -Rf bin/* ./apache-tomcat/bin function build_image { echo "Start build docker image: ${IMAGE_NAME}" diff --git a/activiti-extension/src/main/docker/bin/entrypoint.sh b/activiti-extension/src/main/docker/bin/entrypoint.sh new file mode 100644 index 0000000..703b059 --- /dev/null +++ b/activiti-extension/src/main/docker/bin/entrypoint.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh +# $0 is a script name, +# $1, $2, $3 etc are passed arguments +# $1 is our command +CMD=$1 +case "$CMD" in + "dev" ) + ;; + "start" ) + # we can modify files here, using ENV variables passed in + # "docker create" command. It can't be done during build process. + exec ./startup.sh + ;; + * ) + # Run custom command. Thanks to this line we can still use + # "docker run our_image /bin/bash" and it will work + exec $CMD ${@:2} + ;; +esac
\ No newline at end of file |