Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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 generate.sh \
  5. renewal.sh \
  6. healthcheck.sh \
  7. /tmp/
  8. RUN yum install -y epel-release \
  9. && yum install -y yum-utils python2-certbot-nginx openssl ca-certificates mailx nginx \
  10. && yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
  11. && yum install -y git2u \
  12. && yum clean all \
  13. && rm -rf /var/cache/yum \
  14. && mkdir -p /var/www/html/.well-known \
  15. && mkdir -p /var/log/letsencrypt \
  16. && touch /var/log/letsencrypt/letsencrypt.log \
  17. && chmod +x /tmp/generate.sh \
  18. && chmod +x /tmp/renewal.sh \
  19. && chmod +x /tmp/healthcheck.sh \
  20. && touch /tmp/renewal \
  21. # && ln -sf /dev/stdout /var/log/letsencrypt/letsencrypt.log \
  22. && ln -sf /dev/stdout /var/log/nginx/access.log \
  23. && ln -sf /dev/stderr /var/log/nginx/error.log
  24. COPY default.conf /etc/nginx/conf.d/
  25. HEALTHCHECK --start-period=30s --interval=120s --timeout=20s --retries=2 CMD /tmp/healthcheck.sh
  26. EXPOSE 80
  27. CMD ["nginx", "-g", "daemon off;"]