nginx-certbot/src/Dockerfile

33 lines
1.1 KiB
Docker
Raw Normal View History

FROM nginx
2018-09-28 14:00:02 +00:00
LABEL maintainer="Elliot Saba <staticfloat@gmail.com>, Valder Gallo <valergallo@gmail.com>, Bruno Zell <bruno.zzell@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-04-29 22:04:32 +00:00
# Do this apt/pip stuff all in one RUN command to avoid creating large
# intermediate layers on non-squashable docker installs
RUN apt update && \
apt install -y python python-dev libffi6 libffi-dev libssl-dev curl build-essential procps && \
2017-04-29 22:04:32 +00:00
curl -L 'https://bootstrap.pypa.io/get-pip.py' | python && \
pip install -U cffi certbot && \
apt remove --purge -y python-dev build-essential libffi-dev libssl-dev curl && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2015-11-22 19:17:01 +00:00
2018-05-02 06:03:42 +00:00
# Copy in scripts for 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-06-20 18:27:05 +00:00
# Add /scripts/startup directory to source more startup scripts
RUN mkdir -p /scripts/startup
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"]