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 443
#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
RUN apt remove -y python-dev build-essential libffi-dev libssl-dev curl && apt-get autoremove -y && apt-get clean
# 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 cron python python-dev libffi6 libffi-dev libssl-dev curl build-essential && \
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/*
# Copy in cron job and scripts for certbot
COPY ./crontab /etc/cron.d/certbot