diff --git a/CHANGES.md b/CHANGES.md index f5b123e8a70..13b57e76959 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -63,6 +63,7 @@ - Fix the version check in the vim file to reject Python 3.8 (#4567) - Enhance GitHub Action `psf/black` to read Black version from an additional section in pyproject.toml: `[project.dependency-groups]` (#4606) +- Build gallery docker image with python3-slim and reduce image size (#4686) ### Documentation diff --git a/gallery/Dockerfile b/gallery/Dockerfile index 7a18b7e9a18..ced85e58e6e 100644 --- a/gallery/Dockerfile +++ b/gallery/Dockerfile @@ -1,11 +1,12 @@ -FROM python:3.8.2-slim +FROM python:3-slim # 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 \ + && apt-get install git apt-utils -y --no-install-recommends\ && git config --global user.email "black@psf.github.com" \ - && git config --global user.name "Gallery/Black" + && git config --global user.name "Gallery/Black" \ + && rm -rf /var/lib/apt/lists/* COPY gallery.py / ENTRYPOINT ["python", "/gallery.py"]