Compress RUN statements into one to avoid layer proliferation

Thanks for the suggestion, @imomaliev.
This commit is contained in:
Łukasz Langa 2020-03-17 11:33:57 +01:00
parent fc804d5f59
commit e44e0a6598
No known key found for this signature in database
GPG Key ID: B26995E310250568

View File

@ -1,11 +1,11 @@
FROM python:3.8.2-slim FROM python:3.8.2-slim
RUN apt-get update # note: a single RUN to avoid too many image layers being produced
RUN apt-get upgrade -y RUN apt-get update \
RUN apt-get install git apt-utils -y && apt-get upgrade -y \
&& apt-get install git apt-utils -y \
RUN git config --global user.email "black@psf.github.com" && git config --global user.email "black@psf.github.com" \
RUN git config --global user.name "Gallery/Black" && git config --global user.name "Gallery/Black"
COPY gallery.py / COPY gallery.py /
ENTRYPOINT ["python", "/gallery.py"] ENTRYPOINT ["python", "/gallery.py"]