From 65b3cb1511b843bd6675fbd55cd639a634cc2d45 Mon Sep 17 00:00:00 2001 From: daniellehrner Date: Wed, 8 May 2024 12:37:15 +0200 Subject: [PATCH] do not use NO_PROXY_CACHE env variable with apt-get install to avoid a linting error (#7077) Signed-off-by: Daniel Lehrner --- docker/Dockerfile | 4 +++- ethereum/evmtool/src/main/docker/Dockerfile | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0cbeb3dbba..ee138afca6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,7 +5,9 @@ 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 install $NO_PROXY_CACHE --no-install-recommends -q --assume-yes 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/* /var/cache/apt/archives/partial/* && \ diff --git a/ethereum/evmtool/src/main/docker/Dockerfile b/ethereum/evmtool/src/main/docker/Dockerfile index 62fa5c1149..9d9bf4aafa 100644 --- a/ethereum/evmtool/src/main/docker/Dockerfile +++ b/ethereum/evmtool/src/main/docker/Dockerfile @@ -5,8 +5,11 @@ 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 install $NO_PROXY_CACHE --no-install-recommends -q --assume-yes ca-certificates-java=20190909* && \ - apt-get install $NO_PROXY_CACHE --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* && \ + # $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 ca-certificates-java=20190909* && \ + 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-17-jre-headless=17* && \ # Clean apt cache \ apt-get clean && \ rm -rf /var/cache/apt/archives/* /var/cache/apt/archives/partial/* && \