Optimise nginx certbot example Dockerfile

This commit is contained in:
Markus Opolka
2021-03-22 20:05:30 +01:00
parent debb4037a2
commit ebb51363a1

View File

@@ -1,10 +1,14 @@
FROM nginx FROM nginx:stable
RUN apt-get update && \ LABEL maintainer="markus@martialblog.de"
apt-get install -y certbot curl python-certbot-nginx && \
apt-get -y autoclean; apt-get -y autoremove; \ RUN set -ex; \
rm -rf /var/lib/apt/lists/* apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
certbot curl python-certbot-nginx && \
apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN chmod 700 /entrypoint.sh RUN chmod 700 /entrypoint.sh
CMD ["/entrypoint.sh"] CMD ["/entrypoint.sh"]