Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829
  1. FROM registry.sdsys.ru/iru/iru-base:0.4
  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" \
  9. WORKDIR=$CATALINA_HOME \
  10. DB_CLUSTER=mongodb
  11. EXPOSE 8080 8009 2551
  12. HEALTHCHECK --start-period=300s --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 clean all \
  19. && chmod +x /opt/tomcat8/bin/docker-entrypoint.sh \
  20. && chmod +x /opt/tomcat8/bin/healthcheck.sh \
  21. && chown -R tomcat:tomcat /etc/web-infoclinic
  22. COPY logging.properties /opt/tomcat8/conf/
  23. RUN set -eux; \
  24. localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
  25. USER tomcat
  26. ENV LANG ru_RU.utf8
  27. CMD ["catalina.sh", "run"]