Dockerfile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FROM images.sdsys.ru/sys/iru-base:7.6
  2. ENTRYPOINT ["/opt/docker-entrypoint.sh"]
  3. COPY docker-entrypoint.sh \
  4. healthcheck.sh \
  5. /opt/
  6. ENV CATALINA_HOME="/opt/tomcat"
  7. ENV PATH=$CATALINA_HOME/bin:$PATH \
  8. CATALINA_OPTS="-Dconfig.file=/etc/web-laboratory-admin/application.conf" \
  9. JAVA_HOME=/usr/java/default \
  10. JAVA_OPTS="-Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -XX:+ExitOnOutOfMemoryError" \
  11. WORKDIR=$CATALINA_HOME \
  12. DB_CLUSTER=mongodb \
  13. APPNET=labnetwork
  14. EXPOSE 8091 8080 8009 2551
  15. HEALTHCHECK --start-period=300s --interval=15s --timeout=5s --retries=2 CMD /opt/healthcheck.sh
  16. ARG repo=prod
  17. ARG version=16.1
  18. RUN set -x \
  19. && curl https://repo.infoclinica.ru/yum/centos/sds-${repo}-${version}.repo -o /etc/yum.repos.d/sds-${repo}-${version}.repo \
  20. && yum install tomcat-8.0.26-01 -y \
  21. && yum install iputils telnet nc -y \
  22. && yum install web-laboratory-admin -y \
  23. # && yum install -y http://192.168.201.50/yum/centos/6/prod/16.1/noarch/web-laboratory-admin-16.1-20190326194125.el6.noarch.rpm \
  24. && yum clean all \
  25. && rm -rf /var/cache/yum \
  26. && chmod +x /opt/docker-entrypoint.sh \
  27. && chmod +x /opt/healthcheck.sh \
  28. && chown -R tomcat:tomcat /etc/web-laboratory-admin \
  29. && cd /opt/tomcat/conf/web-laboratory-admin/localhost \
  30. && ln -s /etc/web-laboratory-admin/ROOT.xml ROOT.xml
  31. USER tomcat
  32. CMD ["catalina.sh", "run"]