1 FROM openresty/openresty:alpine
3 MAINTAINER "Guangrong Fu" <fu.guangrong@zte.com.cn>
5 #install java-1.8-openjdk
9 # add a simple script that can auto-detect the appropriate JAVA_HOME value
10 # based on whether the JDK or only the JRE is installed
15 echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
16 } > /usr/local/bin/docker-java-home \
17 && chmod +x /usr/local/bin/docker-java-home
18 ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
19 ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
21 ENV JAVA_VERSION 8u131
22 ENV JAVA_ALPINE_VERSION 8.131.11-r2
25 && apk add --no-cache \
26 openjdk8="$JAVA_ALPINE_VERSION" \
27 && [ "$JAVA_HOME" = "$(docker-java-home)" ]
29 #add holmes related resources to the docker image
31 RUN mkdir /home/holmes
35 ADD holmes-rulemgt-standalone-*-linux64.tar.gz /home/holmes/
39 #RUN apt-get install unzip
41 #RUN unzip -qo holmes-rulemgt-standalone-*-linux64.zip -d .
43 RUN chmod 755 /home/holmes/bin/*.sh
46 CMD /home/holmes/bin/run.sh