From 05950ea811c80e3fc39fdcacfa830368eb4c8954 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sun, 2 Jun 2024 14:39:57 -0400 Subject: [PATCH] Properly clean up apt files after finishing the build --- tier1/Dockerfile | 2 +- tier2/Dockerfile | 2 +- tier3/Dockerfile | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tier1/Dockerfile b/tier1/Dockerfile index af6cdbc7..ccd0814e 100644 --- a/tier1/Dockerfile +++ b/tier1/Dockerfile @@ -9,7 +9,7 @@ RUN echo deb http://deb.debian.org/debian/ bullseye main > /etc/apt/sources.list python2 fp-compiler libxtst6 tini ca-certificates-java openjdk-8-jdk-headless openjdk-8-jre-headless \ $([ "$(arch)" = aarch64 ] && echo binutils-arm-linux-gnueabihf) && \ mkdir -p /etc/perl && \ - rm -rf /var/lib/apt/lists/* && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ useradd -m judge ENTRYPOINT ["/usr/bin/tini", "/code/run"] diff --git a/tier2/Dockerfile b/tier2/Dockerfile index 1f34e43f..648737aa 100644 --- a/tier2/Dockerfile +++ b/tier2/Dockerfile @@ -52,6 +52,6 @@ RUN apt-get update && \ rm -rf roslyn/ && \ apt-get install -y --no-install-recommends mono-devel ./mono-roslyn_no_conflict.deb mono-vbnc fsharp v8dmoj && \ rm -f *.deb) && \ - rm -rf /var/lib/apt/lists/* + apt-get clean && rm -rf /var/lib/apt/lists/* ENV PATH="/opt/dlang/linux/bin64:/home/judge/.cargo/bin:/opt/pypy2/bin:/opt/pypy3/bin:/opt/dart-sdk/bin:${PATH}" diff --git a/tier3/Dockerfile b/tier3/Dockerfile index f8d5454e..0e86a6a7 100644 --- a/tier3/Dockerfile +++ b/tier3/Dockerfile @@ -35,6 +35,7 @@ RUN (cd /opt && \ jq -r '[.[] | select(.prerelease | not) | .assets | flatten | .[] | select((.name | startswith("lean-")) and (.name | endswith("-linux.zip"))) | .browser_download_url][0]')" && \ unzip lean.zip && \ mv lean-*/* /opt/lean && \ - rm -rf lean.zip lean-*; fi + rm -rf lean.zip lean-*; fi && \ + apt-get clean && rm -rf /var/lib/apt/lists/* ENV PATH "/opt/tprolog:/opt/groovy/bin:/opt/kotlin/bin:${PATH}:/opt/swift/usr/bin:/opt/zig:/opt/lean/bin"