Unverified Commit e44e0a65 authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Compress RUN statements into one to avoid layer proliferation

Thanks for the suggestion, @imomaliev.
parent fc804d5f
Loading
Loading
Loading
Loading
+6 −6
Changes for gallery/Dockerfile: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
FROM python:3.8.2-slim

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install git apt-utils -y

RUN git config --global user.email "black@psf.github.com"
RUN git config --global user.name "Gallery/Black"
# note: a single RUN to avoid too many image layers being produced
RUN apt-get update \
 && apt-get upgrade -y \
 && apt-get install git apt-utils -y \
 && git config --global user.email "black@psf.github.com" \
 && git config --global user.name "Gallery/Black"

COPY gallery.py /
ENTRYPOINT ["python", "/gallery.py"]