Kaynağa Gözat

更新 'Dockerfile-base'

stone 5 yıl önce
ebeveyn
işleme
074865c076
1 değiştirilmiş dosya ile 34 ekleme ve 21 silme
  1. 34 21
      Dockerfile-base

+ 34 - 21
Dockerfile-base

@@ -1,27 +1,40 @@
-FROM hub.evbj.easou.com/pro/dashouye:1.0.1
-MAINTAINER guizhong[guizhong_liu@staff.easou.com]
+FROM hub.evbj.easou.com/dev/centos:6.8
 
+MAINTAINER robert[robert_du@staff.easou.com]
 
-ADD resin.conf /app/soft/resin-pro-3.1.6/conf/resin.conf
-ADD nginxlog_cut.sh /cron/root/nginxlog_cut.sh
-ADD hostlist.conf /app/soft/tengine/conf/vhosts/www/hostlist.conf
-ADD www.conf /app/soft/tengine/conf/vhosts/www/www.conf
-ADD root /var/spool/cron/root
-ADD entrypoint.sh /usr/bin/entrypoint.sh
-ADD resin.ini /etc/supervisor/conf.d/resin.ini
-ADD rsyncd.wapage /etc/rsyncd.wapage
-ADD release /etc/release
+ENV LANG C.UTF-8
+ENV TZ=Asia/Shanghai
+ENV JAVA_HOME /usr/java/jdk1.7.0_79
+ENV RESIN_HOME /app/soft/resin-api
 
+#install jdk
+RUN yum install -y wget \
+    && rpm -Uvh http://10.26.22.185:9000/psop/soft/jdk-7u79-linux-x64.rpm \
+    && mv /etc/security/limits.conf /etc/security/limits.conf.bak \
+    && useradd wapage \
+    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
+    && wget -O /usr/local/bin/gosu http://10.26.22.185:9000/psop/conf/dockerConfig/resin-api/gosu \
+    && chmod +x /usr/local/bin/gosu \
+    && gosu nobody true
+
+#config system
+ADD limits.conf /etc/security/
+ADD sysctl.conf /etc/    
+
+#install resin-api
+RUN mkdir -p /app/soft \ 
+    && wget -P /app/soft http://10.26.22.185:9000/psop/soft/resin-pro-3.1.16.k8s.tar.gz \
+    && tar -zxf /app/soft/resin-pro-3.1.16.k8s.tar.gz -C /app/soft \
+    && rm -f /app/soft/resin-pro-3.1.16.k8s.tar.gz \
+    && rm -rf /app/soft/resin-api/webapps/* \
+    && mv /app/soft/resin-api/conf/resin.conf  /app/soft/resin-api/conf/resin.conf.bak \
+    && wget -P /app/soft/resin-api/webapps http://10.26.22.185:9000/psop/release/EASOU/dashouye/ROOT.war 
+
+#ADD ./target/ROOT.war  /app/soft/resin-api/webapps/ROOT.war
+ADD resin.conf /app/soft/resin-api/conf
+ADD docker-entrypoint.sh /usr/bin/entrypoint.sh
+RUN chown wapage:wapage -R /app/soft/resin-api && chmod +x /usr/bin/entrypoint.sh
 
-RUN yum install -y rsync \
-	&& rm -rf /data/project/* \
-	&& rm -rf /app/soft/flume \
-	&& chmod 600 /etc/rsyncd.wapage \
-	&& chmod +x /usr/bin/entrypoint.sh \
-	&& chmod +x /cron/root/nginxlog_cut.sh \
-	&& export RELEASE=`head -n 1 /etc/release` \
-	&& rsync -vzrtopg --progress $RELEASE/wapage2web_baidu.war /app/soft/resin-pro-3.1.6/webapps/ROOT.war --password-file=/etc/rsyncd.wapage
- 
 #start resin
 ENTRYPOINT ["entrypoint.sh"]
-CMD ["/usr/bin/supervisord","-c", "/etc/supervisor/supervisord.conf"]
+CMD ["gosu", "wapage", "/app/soft/resin-api/bin/httpd.sh"]