nginx-certbot/Dockerfile

28 lines
999 B
Docker
Raw Normal View History

FROM nginx
MAINTAINER Elliot Saba <staticfloat@gmail.com>
2015-11-22 19:17:01 +00:00
VOLUME /etc/letsencrypt
2016-09-21 12:22:55 +00:00
EXPOSE 80
EXPOSE 443
2015-11-22 19:17:01 +00:00
2017-01-25 05:08:10 +00:00
#RUN apt update && apt install -y cron python python-dev python-pip libffi-dev libssl-dev
#RUN pip install -U cffi certbot
RUN apt update && apt install -y cron python python-dev libffi6 libffi-dev libssl1.0.0 libssl-dev curl build-essential
RUN curl -L 'https://bootstrap.pypa.io/get-pip.py' | python
RUN pip install -U cffi certbot
2017-01-25 05:08:10 +00:00
RUN apt remove -y python-dev build-essential libffi-dev libssl-dev curl && apt-get autoremove -y && apt-get clean
2015-11-22 19:17:01 +00:00
# Copy in cron job and scripts for certbot
COPY ./crontab /etc/cron.d/certbot
2017-01-01 20:58:42 +00:00
RUN crontab /etc/cron.d/certbot
2016-09-21 01:12:59 +00:00
COPY ./scripts/ /scripts
2017-01-20 02:17:56 +00:00
RUN chmod +x /scripts/*.sh
2016-09-21 01:12:59 +00:00
2017-01-23 06:58:30 +00:00
# Copy in default nginx configuration (which just forwards ACME requests to
# certbot, or redirects to HTTPS, but has no HTTPS configurations by default).
RUN rm -f /etc/nginx/conf.d/*
COPY nginx_conf.d/ /etc/nginx/conf.d/
2016-09-21 01:12:59 +00:00
ENTRYPOINT []
2017-01-02 05:34:59 +00:00
CMD ["/bin/bash", "/scripts/entrypoint.sh"]