diff --git a/docker/centos7-jdk8/Dockerfile b/docker/centos7-jdk8/Dockerfile new file mode 100644 index 0000000000..546d3247fc --- /dev/null +++ b/docker/centos7-jdk8/Dockerfile @@ -0,0 +1,12 @@ +FROM docker.io/centos:7 + +MAINTAINER mikexue + +RUN yum update -y && yum install net-tools -y && yum install lrzsz -y && yum install vim -y +ADD jdk-8u281-linux-x64.tar.gz /usr/local/src/ +RUN ln -s /usr/local/src/jdk1.8.0_281/ /usr/local/jdk + +ENV JAVA_HOME /usr/local/jdk +ENV JRE_HOME $JAVA_HOME/jre +ENV CLASSPATH .:$JAVA_HOME/lib/:$JRE_HOME/lib/ +ENV PATH $PATH:$JAVA_HOME/bin diff --git a/docker/eventmesh-defibus/Dockerfile b/docker/eventmesh-defibus/Dockerfile new file mode 100644 index 0000000000..1077ff07e8 --- /dev/null +++ b/docker/eventmesh-defibus/Dockerfile @@ -0,0 +1,15 @@ +FROM centos7-jdk8:latest + +MAINTAINER mikexue mike_xwm@126.com + +WORKDIR /data +RUN mkdir /data/app +ADD eventmesh-runtime_1.2.0-SNAPSHOT.tar.gz /data/app/eventmesh +COPY eventmesh-connector-defibus-1.2.0-SNAPSHOT.jar /data/app/eventmesh/apps +WORKDIR /data/app/eventmesh/bin + +EXPOSE 10000 +EXPOSE 10105 + +ENV DOCKER true +CMD sh start.sh diff --git a/docker/eventmesh-rocketmq/Dockerfile b/docker/eventmesh-rocketmq/Dockerfile new file mode 100644 index 0000000000..f18309d88c --- /dev/null +++ b/docker/eventmesh-rocketmq/Dockerfile @@ -0,0 +1,16 @@ +FROM centos7-jdk8:latest + +MAINTAINER mikexue mike_xwm@126.com + +WORKDIR /data +RUN mkdir /data/app +ADD eventmesh-runtime_1.2.0-SNAPSHOT.tar.gz /data/app/eventmesh +COPY eventmesh-connector-rocketmq-1.2.0.jar /data/app/eventmesh/apps +WORKDIR /data/app/eventmesh/bin + +EXPOSE 10000 +EXPOSE 10105 + +ENV DOCKER true + +CMD sh start.sh diff --git a/eventmesh-runtime/bin/start.sh b/eventmesh-runtime/bin/start.sh index fd2e8ec884..9effccf2ba 100644 --- a/eventmesh-runtime/bin/start.sh +++ b/eventmesh-runtime/bin/start.sh @@ -155,6 +155,11 @@ echo "using jdk[$JAVA]" >> ${PROXY_LOG_HOME}/proxy.out PROXY_MAIN=com.webank.eventmesh.runtime.boot.ProxyStartup -$JAVA $JAVA_OPT -classpath ${PROXY_HOME}/conf:${PROXY_HOME}/apps/*:${PROXY_HOME}/lib/* $PROXY_MAIN >> ${PROXY_LOG_HOME}/proxy.out 2>&1 & +if [ $DOCKER ] +then + $JAVA $JAVA_OPT -classpath ${PROXY_HOME}/conf:${PROXY_HOME}/apps/*:${PROXY_HOME}/lib/* $PROXY_MAIN >> ${PROXY_LOG_HOME}/proxy.out +else + $JAVA $JAVA_OPT -classpath ${PROXY_HOME}/conf:${PROXY_HOME}/apps/*:${PROXY_HOME}/lib/* $PROXY_MAIN >> ${PROXY_LOG_HOME}/proxy.out 2>&1 & echo $!>pid.file +fi exit 0