浏览代码

toolset: Reduce the packages installed by APT (#10253)

Make sure that APT does not install anything unnecessary.

Signed-off-by: Anton Kirilov <[email protected]>
Anton Kirilov 1 月之前
父节点
当前提交
65fc874dad
共有 3 个文件被更改,包括 5 次插入8 次删除
  1. 3 2
      Dockerfile
  2. 1 1
      entrypoint.sh
  3. 1 5
      toolset/__init__.py

+ 3 - 2
Dockerfile

@@ -4,10 +4,11 @@ ARG DEBIAN_FRONTEND=noninteractive
 # WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
 # One -q produces output suitable for logging (mostly hides
 # progress indicators)
-RUN apt-get -yqq update && \
-    apt-get -yqq install \
+RUN apt-get install \
+      --no-install-recommends \
       -o Dpkg::Options::="--force-confdef" \
       -o Dpkg::Options::="--force-confold" \
+      -qqUy \
       cloc \
       curl \
       gcc \

+ 1 - 1
entrypoint.sh

@@ -4,4 +4,4 @@ set -eo pipefail -u
 
 chown -LR "$USER_ID" /var/run
 # Drop permissions of user to match those of the host system
-gosu "$USER_ID" python3 "${FWROOT}/toolset/run-tests.py" "$@"
+exec gosu "$USER_ID" python3 "${FWROOT}/toolset/run-tests.py" "$@"

+ 1 - 5
toolset/__init__.py

@@ -4,11 +4,7 @@ FROM ubuntu:24.04
 COPY concurrency.sh pipeline.lua pipeline.sh query.sh ./
 
 ARG DEBIAN_FRONTEND=noninteractive
-RUN apt-get -yqq update >/dev/null && \
-    apt-get -yqq install >/dev/null \
-      curl \
-      wrk && \
-    chmod 777 concurrency.sh pipeline.sh query.sh
+RUN apt-get install --no-install-recommends -qqUy curl wrk > /dev/null
 
 # Environment vars required by the wrk scripts with nonsense defaults
 ENV accept=accept \