Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM hub.evbj.easou.com/dev/centos:7.9.2009
  2. LABEL author="robert_du[robert_du@easou.cn]"
  3. ENV LANG en_US.UTF-8
  4. ENV TZ=Asia/Shanghai
  5. ENV JAVA_HOME /usr/java/jdk1.8.0_271
  6. ENV TOMCAT_HOME /opt/tomcat-7.0.105
  7. COPY entrypoint.sh /usr/bin/entrypoint.sh
  8. COPY CentOS-Base.repo /etc/yum.repos.d
  9. COPY epel.repo /etc/yum.repos.d
  10. COPY root /tmp/root
  11. #install jdk8 & tomcat
  12. RUN yum install -y epel-release \
  13. && yum install -y wget rsync lsof crontabs vim psmisc supervisor \
  14. && mkdir -p /usr/java \
  15. && curl -O http://10.40.20.103:9000/psop/soft/jdk1.8.0_271.tar.gz \
  16. && curl -O http://10.40.20.103:9000/psop/soft/tomcat-7.0.105.tar.gz \
  17. && tar -xf jdk1.8.0_271.tar.gz -C /usr/java/ \
  18. && tar -xf tomcat-7.0.105.tar.gz -C /opt/ \
  19. && rm -f jdk1.8.0_271.tar.gz tomcat-7.0.105.tar.gz \
  20. && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
  21. && chmod +x /usr/bin/entrypoint.sh \
  22. && echo 'export JAVA_HOME=/usr/java/jdk1.8.0_271' >> /etc/profile \
  23. && echo 'export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib' >> /etc/profile \
  24. && echo 'export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin' >> /etc/profile \
  25. && echo "ulimit -n 65535" >> /etc/profile \
  26. && echo "ulimit -u 65535" >> /etc/profile \
  27. && sed -i -e '/pam_loginuid.so/s/^/#/' /etc/pam.d/crond \
  28. && mv /tmp/root /var/spool/cron/root \
  29. && chmod 600 /var/spool/cron/root \
  30. && source /etc/profile \
  31. && sed -i 's/nodaemon=false/nodaemon=true/g' /etc/supervisord.conf
  32. COPY log_clear.sh /cron/root/log_clear.sh
  33. COPY tomcat.ini /etc/supervisord.d/tomcat.ini
  34. #start tomcat
  35. ENTRYPOINT ["entrypoint.sh"]
  36. CMD ["supervisord"]