Skip to content

Commit c7317b5

Browse files
committed
chore: prevent image pollution with log information
1 parent 351ed98 commit c7317b5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.devcontainer/cpp/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ RUN --mount=type=cache,target=/root/.ccache,sharing=locked \
9292

9393
# Update all tool alternatives to the correct version
9494
# and patch root's bashrc to include bash-completion
95-
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 10 \
95+
RUN --mount=type=cache,target=/var/log,sharing=locked \
96+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 10 \
9697
--slave /usr/bin/g++ g++ /usr/bin/g++-14 \
9798
--slave /usr/bin/gcov gcov /usr/bin/gcov-14 \
9899
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 10 \

.devcontainer/rust/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
4444

4545
# Update all tool alternatives to the correct version
4646
# and patch root's bashrc to include bash-completion
47-
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 20 \
47+
RUN --mount=type=cache,target=/var/log,sharing=locked \
48+
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-14 20 \
4849
&& cp /etc/skel/.bashrc /root/.bashrc
4950

5051
# Install additional rust tools

0 commit comments

Comments
 (0)