Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930
  1. FROM images.sdsys.ru/sys/iru-base:7.6
  2. ENTRYPOINT ["docker-entrypoint.sh"]
  3. COPY docker-entrypoint.sh healthcheck.sh /opt/tomcat8/bin/
  4. ENV CATALINA_HOME="/opt/tomcat8"
  5. ENV PATH=$CATALINA_HOME/bin:$PATH \
  6. CATALINA_OPTS="-Dconfig.file=/etc/web-infoclinic/application.conf" \
  7. JAVA_HOME=/usr/java/default \
  8. JAVA_OPTS="-Xms512M -Xmx1024M -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -XX:+ExitOnOutOfMemoryError" \
  9. WORKDIR=$CATALINA_HOME \
  10. DB_CLUSTER=mongodb
  11. EXPOSE 8080 8009 2551
  12. HEALTHCHECK --start-period=120s --interval=15s --timeout=5s --retries=2 CMD healthcheck.sh
  13. ARG repo=prod
  14. RUN set -x \
  15. && curl https://repo.infoclinica.ru/yum/centos/sds-${repo}-portal.repo -o /etc/yum.repos.d/sds-${repo}-portal.repo \
  16. && yum install tomcat8 -y \
  17. && yum install web-registry-admin -y \
  18. && yum update tzdata -y \
  19. && yum clean all \
  20. && chmod +x /opt/tomcat8/bin/docker-entrypoint.sh \
  21. && chmod +x /opt/tomcat8/bin/healthcheck.sh \
  22. && chown -R tomcat:tomcat /etc/web-infoclinic
  23. COPY logging.properties /opt/tomcat8/conf/
  24. RUN set -eux; \
  25. localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
  26. #USER tomcat
  27. ENV LANG ru_RU.utf8
  28. CMD ["catalina.sh", "run"]