Skip to content

Commit

Permalink
Update Dockerfile - reuse NO_PROXY_CACHE env (#7203)
Browse files Browse the repository at this point in the history
* Update Dockerfile

reuse NO_PROXY_CACHE env

Signed-off-by: Enrico Del Fante <[email protected]>

* Update Dockerfile

Signed-off-by: Enrico Del Fante <[email protected]>

---------

Signed-off-by: Enrico Del Fante <[email protected]>
Co-authored-by: Usman Saleem <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
  • Loading branch information
3 people authored Jun 13, 2024
1 parent 85d286a commit dfe256e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ 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 && \
# $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* && \
apt-get $NO_PROXY_CACHE --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/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/archives/* && 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.
Expand Down

0 comments on commit dfe256e

Please sign in to comment.