From 7303231c689d285e6afdc771dfba68c541f96f0a Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 25 Oct 2023 18:23:38 +0300 Subject: [PATCH] Dockerfile: run apt-get install --no-install-recommends This reduces the packages being installed, and thus the overal container image build time and size. We do need to explicitly specify libc6-dev now. Before: 2 upgraded, 69 newly installed, 0 to remove and 15 not upgraded. Need to get 70.5 MB of archives.A After this operation, 267 MB of additional disk space will be used. After: 2 upgraded, 34 newly installed, 0 to remove and 15 not upgraded. Need to get 54.0 MB of archives. After this operation, 210 MB of additional disk space will be used. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ddc07cc..d07e607 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app COPY requirements.txt . # Install gcc temporarily until wheels for httptools on Python 3.12 are available -RUN apt-get update && apt-get install -y gcc libmagic1 && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install --no-install-recommends -y gcc libc6-dev libmagic1 && rm -rf /var/lib/apt/lists/* RUN --mount=type=cache,target=/root/.cache pip install -r requirements.txt