Explorar el Código

更新 'Dockerfile'

robert hace 5 meses
padre
commit
81b5dc26c0
Se han modificado 1 ficheros con 3 adiciones y 30 borrados
  1. 3 30
      Dockerfile

+ 3 - 30
Dockerfile

@@ -1,4 +1,4 @@
-FROM hub.evbj.easou.com/dev/centos:7.9.2009
+FROM hub.evbj.easou.com/dev/tomcat7:latest
 
 LABEL author="robert_du[robert_du@easou.cn]"
 
@@ -8,36 +8,9 @@ ENV JAVA_HOME /usr/java/jdk1.8.0_271
 ENV TOMCAT_HOME /opt/tomcat-7.0.105
 
 COPY entrypoint.sh /usr/bin/entrypoint.sh
-COPY CentOS-Base.repo /etc/yum.repos.d
-COPY epel.repo /etc/yum.repos.d
-COPY root /tmp/root
-
-#install jdk8 & tomcat 
-
-RUN yum install -y epel-release \
-    && yum install -y wget rsync lsof crontabs vim psmisc supervisor \
-    && mkdir -p /usr/java \
-    && curl -O http://10.40.20.103:9000/psop/soft/jdk1.8.0_271.tar.gz \
-    && curl -O http://10.40.20.103:9000/psop/soft/tomcat-7.0.105.tar.gz \
-    && tar -xf jdk1.8.0_271.tar.gz -C /usr/java/ \ 
-    && tar -xf tomcat-7.0.105.tar.gz -C /opt/ \
-    && rm -f jdk1.8.0_271.tar.gz tomcat-7.0.105.tar.gz \
-    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
-    && chmod +x /usr/bin/entrypoint.sh \
-    && echo 'export JAVA_HOME=/usr/java/jdk1.8.0_271' >> /etc/profile \
-    && echo 'export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib' >> /etc/profile \
-    && echo 'export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin' >> /etc/profile \
-    && echo "ulimit -n 65535" >> /etc/profile \
-    && echo "ulimit -u 65535" >> /etc/profile \
-    && sed -i -e '/pam_loginuid.so/s/^/#/' /etc/pam.d/crond \
-    && mv /tmp/root /var/spool/cron/root \
-    && chmod 600 /var/spool/cron/root \
-    && source /etc/profile \
-    && sed -i 's/nodaemon=false/nodaemon=true/g' /etc/supervisord.conf 
-
-
-COPY log_clear.sh /cron/root/log_clear.sh
 COPY tomcat.ini /etc/supervisord.d/tomcat.ini
+RUN chmod +x /usr/bin/entrypoint.sh \
+    && sed -i 's/nodaemon=false/nodaemon=true/g' /etc/supervisord.conf
 
 
 #start tomcat