Browse Source

更新 'Dockerfile'

robert 3 years ago
parent
commit
69023116ad
1 changed files with 35 additions and 1 deletions
  1. 35 1
      Dockerfile

+ 35 - 1
Dockerfile

@@ -1 +1,35 @@
-FROM
+FROM centos:7
+
+LABEL author="robert[robert_du@easou.cn]"
+
+ENV LANG C.UTF-8
+ENV TZ=Asia/Shanghai
+ENV JAVA_HOME /usr/java/jdk1.8.0_271
+ENV RESIN_HOME /app/soft/resin-4.0.65
+
+#install jdk8 & resin4 & flume
+
+RUN yum install -y wget rsync epel-release \
+    && useradd book \
+    && yum install -y supervisor \
+    && mkdir -p /usr/java  /app/soft \
+    && curl -O http://10.26.22.185:9000/psop/soft/jdk-8u271-linux-x64.tar.gz \
+    && curl -O http://10.26.22.185:9000/book/api-rs/resin-4.0.65-relase.tar.gz \
+    && tar -zxf jdk-8u101-linux-x64.tar.gz -C /usr/java/ \ 
+    && tar -zxf resin-4.0.65-relase.tar.gz -C /app/soft/ \
+    && rm -f jdk-8u101-linux-x64.tar.gz resin-4.0.65-relase.tar.gz \
+    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+COPY resin.xml /app/soft/resin-4.0.65/conf/resin.xml
+COPY resin.properties /app/soft/resin-4.0.65/conf/resin.properties
+COPY entrypoint.sh /usr/bin/entrypoint.sh
+COPY release /etc/release 
+COPY supervisord.conf /etc/supervisord.conf
+
+RUN export RELEASE=`head -n 1 /etc/release` \
+    && rsync -avz $RELEASE/ROOT.war /tmp/ROOT.war \
+    && chmod +x /usr/bin/entrypoint.sh
+
+#start resin
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["supervisord"]