Skip to content

Commit 78d7dd2

Browse files
authored
[github] remove more caches after downloading things (#133129)
This is generally good practice if the caches won't be reused (though arguably pedantic for the `stage1-toolchain` stage). `docker history` on comparable images showed that this saves a few hundred MB on stage1, and ~60MB on the `apt-get` layer of `ci-container-agent`.
1 parent 26bc1c6 commit 78d7dd2

File tree

1 file changed

+9
-3
lines changed
  • .github/workflows/containers/github-action-ci

1 file changed

+9
-3
lines changed

.github/workflows/containers/github-action-ci/Dockerfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ RUN apt-get update && \
1414
python3 \
1515
git \
1616
curl \
17-
zlib1g-dev
17+
zlib1g-dev && \
18+
apt-get clean && \
19+
rm -rf /var/lib/apt/lists/*
1820

19-
RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && tar -xf llvmorg-$LLVM_VERSION.tar.gz
21+
RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && \
22+
tar -xf llvmorg-$LLVM_VERSION.tar.gz && \
23+
rm -f llvmorg-$LLVM_VERSION.tar.gz
2024

2125
WORKDIR /llvm-project-llvmorg-$LLVM_VERSION
2226

@@ -65,7 +69,9 @@ RUN apt-get update && \
6569
python3-pip \
6670
ccache \
6771
file \
68-
tzdata
72+
tzdata && \
73+
apt-get clean && \
74+
rm -rf /var/lib/apt/lists/*
6975

7076
# Install sccache as it is needed by most of the project test workflows and
7177
# cannot be installed by the ccache action when executing as a non-root user.

0 commit comments

Comments
 (0)