Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM centos:7.6.1810
  2. LABEL maintainer="tomishinets.v@sdsys.ru"
  3. COPY nginx.repo /etc/yum.repos.d/nginx.repo
  4. COPY err_trap \
  5. generate.sh \
  6. renewal.sh \
  7. healthcheck.sh \
  8. /tmp/
  9. RUN yum install -y epel-release \
  10. && yum install -y yum-utils python2-certbot-nginx openssl ca-certificates mailx nginx \
  11. && yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
  12. && yum install -y git2u \
  13. && yum clean all \
  14. && rm -rf /var/cache/yum \
  15. && mkdir -p /var/www/html/.well-known \
  16. && mkdir -p /var/log/letsencrypt \
  17. && touch /var/log/letsencrypt/letsencrypt.log \
  18. && chmod +x /tmp/err_trap \
  19. && chmod +x /tmp/generate.sh \
  20. && chmod +x /tmp/renewal.sh \
  21. && chmod +x /tmp/healthcheck.sh \
  22. && touch /tmp/renewal \
  23. # && ln -sf /dev/stdout /var/log/letsencrypt/letsencrypt.log \
  24. && ln -sf /dev/stdout /var/log/nginx/access.log \
  25. && ln -sf /dev/stderr /var/log/nginx/error.log
  26. COPY default.conf /etc/nginx/conf.d/
  27. HEALTHCHECK --start-period=20s --interval=10s --timeout=5s --retries=2 CMD /tmp/healthcheck.sh
  28. EXPOSE 80
  29. CMD ["nginx", "-g", "daemon off;"]