Dockerfile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. FROM images.sdsys.ru/sys/iru-base:7.6
  2. ENTRYPOINT ["/tmp/docker-entrypoint.sh"]
  3. COPY docker-entrypoint.sh \
  4. healthcheck.sh \
  5. /tmp/
  6. COPY mongodb-org-3.6.repo /etc/yum.repos.d/
  7. ENV CATALINA_HOME="/opt/tomcat"
  8. ENV PATH=$CATALINA_HOME/bin:$PATH \
  9. CATALINA_OPTS="-Dconfig.file=/etc/web-laboratory/application.conf -Dnet.spy.log.LoggerImpl=net.spy.memcached.compat.log.SunLogger" \
  10. JAVA_HOME=/usr/java/default \
  11. JAVA_OPTS="-Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -XX:+ExitOnOutOfMemoryError" \
  12. WORKDIR=$CATALINA_HOME \
  13. DB_CLUSTER=mongodb \
  14. APPNET=labnetwork \
  15. ADMIN_HOST=admin-lab
  16. EXPOSE 8090 9000 2551
  17. HEALTHCHECK --start-period=30s --interval=20s --timeout=10s --retries=2 CMD /tmp/healthcheck.sh
  18. ARG repo=prod
  19. ARG version=16.1
  20. ARG memcached_version=2.3.2
  21. ARG spymemcached_version=2.12.3
  22. RUN set -x \
  23. && curl https://repo.infoclinica.ru/yum/centos/sds-${repo}-${version}.repo -o /etc/yum.repos.d/sds-${repo}-${version}.repo \
  24. && yum install iputils -y \
  25. && yum install tomcat-8.0.26-01 -y \
  26. && yum install web-laboratory -y \
  27. && yum install mongodb-org-shell -y \
  28. && yum clean all \
  29. && chmod +x /tmp/docker-entrypoint.sh \
  30. && chmod +x /tmp/healthcheck.sh \
  31. && curl https://repo1.maven.org/maven2/de/javakaffee/msm/memcached-session-manager/${memcached_version}/memcached-session-manager-${memcached_version}.jar -o /opt/tomcat/lib/memcached-session-manager-${memcached_version}.jar \
  32. && curl https://repo1.maven.org/maven2/de/javakaffee/msm/memcached-session-manager-tc8/${memcached_version}/memcached-session-manager-tc8-${memcached_version}.jar -o /opt/tomcat/lib/memcached-session-manager-tc8-${memcached_version}.jar \
  33. && curl https://repo1.maven.org/maven2/net/spy/spymemcached/${spymemcached_version}/spymemcached-${spymemcached_version}.jar -o /opt/tomcat/lib/spymemcached-${spymemcached_version}.jar \
  34. && chown -R tomcat:tomcat /etc/web-laboratory \
  35. && cd /opt/tomcat/conf/web-laboratory/localhost \
  36. && ln -s /etc/web-laboratory/ROOT.xml ROOT.xml
  37. COPY ROOT.xml /etc/web-laboratory/
  38. COPY server.xml /opt/tomcat/conf/
  39. RUN chown -R tomcat:tomcat /opt/apache-tomcat-8.0.26 \
  40. && chown -R tomcat:tomcat /etc/web-laboratory
  41. USER tomcat
  42. CMD ["catalina.sh", "run"]