Cleanup `Dockerfile` a bit

This commit is contained in:
Elliot Saba 2017-04-29 15:04:32 -07:00
parent 41f6416d7c
commit 0a239137b0
1 changed files with 10 additions and 6 deletions

View File

@ -5,12 +5,16 @@ VOLUME /etc/letsencrypt
EXPOSE 80 EXPOSE 80
EXPOSE 443 EXPOSE 443
#RUN apt update && apt install -y cron python python-dev python-pip libffi-dev libssl-dev # Do this apt/pip stuff all in one RUN command to avoid creating large
#RUN pip install -U cffi certbot # intermediate layers on non-squashable docker installs
RUN apt update && apt install -y cron python python-dev libffi6 libffi-dev libssl1.0.0 libssl-dev curl build-essential RUN apt update && \
RUN curl -L 'https://bootstrap.pypa.io/get-pip.py' | python apt install -y cron python python-dev libffi6 libffi-dev libssl-dev curl build-essential && \
RUN pip install -U cffi certbot curl -L 'https://bootstrap.pypa.io/get-pip.py' | python && \
RUN apt remove -y python-dev build-essential libffi-dev libssl-dev curl && apt-get autoremove -y && apt-get clean 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/*
# Copy in cron job and scripts for certbot # Copy in cron job and scripts for certbot
COPY ./crontab /etc/cron.d/certbot COPY ./crontab /etc/cron.d/certbot