Dockerfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM images.sdsys.ru/sys/iru-base:7.6
  2. ENTRYPOINT ["/entrypoint.sh"]
  3. COPY entrypoint.sh \
  4. /
  5. # Change export PATH. See https://github.com/GoogleContainerTools/kaniko/issues/748
  6. ENV CATALINA_HOME="/opt/tomcat" \
  7. PATH="${PATH}:/opt/tomcat/bin" \
  8. CATALINA_OPTS="-Dconfig.file=/etc/web-laboratory/application.conf -Dnet.spy.log.LoggerImpl=net.spy.memcached.compat.log.SunLogger" \
  9. JAVA_HOME=/usr/java/default \
  10. JAVA_OPTS="-Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true" \
  11. WORKDIR=$CATALINA_HOME \
  12. ADMIN_HOST=admin.lab
  13. EXPOSE 8090 9000 2551
  14. HEALTHCHECK --start-period=30s --interval=20s --timeout=10s --retries=2 CMD /healthcheck.sh
  15. ARG repo=prod
  16. ARG version=16.1
  17. ARG memcached_version=2.3.2
  18. ARG spymemcached_version=2.12.3
  19. RUN set -x \
  20. && curl https://repo.infoclinica.ru/yum/centos/sds-${repo}-${version}.repo -o /etc/yum.repos.d/sds-${repo}-${version}.repo \
  21. && yum install -y iputils tomcat-8.0.26-01 \
  22. && yum install -y web-laboratory \
  23. && yum clean all \
  24. && chmod +x /entrypoint.sh \
  25. && 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 \
  26. && 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 \
  27. && curl https://repo1.maven.org/maven2/net/spy/spymemcached/${spymemcached_version}/spymemcached-${spymemcached_version}.jar -o /opt/tomcat/lib/spymemcached-${spymemcached_version}.jar \
  28. && cd /opt/tomcat/conf/web-laboratory/localhost \
  29. && ln -s /etc/web-laboratory/ROOT.xml ROOT.xml
  30. COPY server.xml /opt/tomcat/conf/
  31. RUN chown -R tomcat:tomcat /opt/apache-tomcat-8.0.26 \
  32. && chown -R tomcat:tomcat /etc/web-laboratory
  33. USER tomcat
  34. CMD ["catalina.sh", "run"]