From a87f81445585e022bd006bf8b7e8f20175309b10 Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Thu, 13 Jun 2024 10:21:48 +1000 Subject: [PATCH] Revert "Update Dockerfile - reuse NO_PROXY_CACHE env (#7203)" This reverts commit dfe256e6478a91122e40adda928a71e1353668f1. --- docker/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e7878ccdd9b..ee138afca62 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,10 +5,13 @@ ENV NO_PROXY_CACHE="-o Acquire::BrokenProxy=true -o Acquire::http::No-Cache=true # Update and install dependencies without using any cache RUN apt-get update $NO_PROXY_CACHE && \ - apt-get $NO_PROXY_CACHE --no-install-recommends -q --assume-yes install openjdk-21-jre-headless=21* libjemalloc-dev=5.* adduser=3* && \ + # $NO_PROXY_CACHE must not be used here or otherwise will trigger a hadolint error + apt-get -o Acquire::BrokenProxy=true -o Acquire::http::No-Cache=true -o Acquire::http::Pipeline-Depth=0 \ + --no-install-recommends -q --assume-yes install openjdk-21-jre-headless=21* libjemalloc-dev=5.* adduser=3* && \ # Clean apt cache apt-get clean && \ - rm -rf /var/cache/apt/archives/* && rm -rf /var/lib/apt/lists/* && \ + rm -rf /var/cache/apt/archives/* /var/cache/apt/archives/partial/* && \ + rm -rf /var/lib/apt/lists/* && \ # Ubuntu 23.10 comes with an "ubuntu" user with uid 1000. We need 1000 for besu. userdel ubuntu 2>/dev/null || true && rm -rf /home/ubuntu && \ # Ensure we use a stable UID for besu, as file permissions are tied to UIDs.