From 62ca34c2d60a7790d181fdbf8d37f10ee517e0d8 Mon Sep 17 00:00:00 2001 From: Montana Mendy Date: Wed, 8 Mar 2023 17:15:03 -0800 Subject: [PATCH] Use of apt-get update should be paired with `rm -rf /var/lib/apt/lists/*` in the same layer. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71fa920..563dd1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,10 +18,9 @@ ARG TRIVY_VERSION="v0.31.3" COPY dist/hoppr_cop-*-py3-none-any.whl /tmp # hadolint ignore=DL3008 -RUN apt-get update \ +RUN apt-get update && rm -rf /var/lib/apt/lists/* \ && apt-get install --yes --no-install-recommends ${APT_PKGS} \ && apt-get clean \ - && rm -r /var/lib/apt/lists/* \ && export PIP_TRUSTED_HOST="pypi.org pypi.python.org files.pythonhosted.org" \ && python3 -m pip install --no-cache-dir /tmp/hoppr_cop-*-py3-none-any.whl \ && rm /tmp/hoppr_cop-*-py3-none-any.whl \