Skip to content

Commit ad3e65d

Browse files
real-or-randomhebasto
authored andcommitted
ci: Remove GCC build files and sage to reduce size of Docker image
1 parent 6b9507a commit ad3e65d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ci/linux-debian.Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:stable
1+
FROM debian:stable-slim
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -28,7 +28,8 @@ WORKDIR /root
2828

2929
# Build and install gcc snapshot
3030
ARG GCC_SNAPSHOT_MAJOR=14
31-
RUN wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --level 1 --no-directories "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}" && \
31+
RUN mkdir gcc && cd gcc && \
32+
wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --level 1 --no-directories "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}" && \
3233
wget "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}/sha512.sum" && \
3334
sha512sum --check --ignore-missing sha512.sum && \
3435
# We should have downloaded exactly one tar.xz file
@@ -40,6 +41,9 @@ RUN wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --leve
4041
../*/configure --prefix=/opt/gcc-snapshot --enable-languages=c --disable-bootstrap --disable-multilib --without-isl && \
4142
make -j $(nproc) && \
4243
make install && \
44+
apt-get autoremove -y libgmp-dev libmpfr-dev libmpc-dev flex && \
45+
apt-get clean && \
46+
cd ../.. && rm -rf gcc && \
4347
ln -s /opt/gcc-snapshot/bin/gcc /usr/bin/gcc-snapshot
4448

4549
# Install clang snapshot

0 commit comments

Comments
 (0)