Skip to content

Commit 2dc043a

Browse files
committed
GCC 12
1 parent 1ffdab1 commit 2dc043a

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ RUN apt-get update \
1010
curl \
1111
git \
1212
ca-certificates \
13-
build-essential \
13+
gcc-12 \
14+
g++-12 \
15+
make \
16+
libc6-dev \
17+
xz-utils \
18+
bzip2 \
1419
pkg-config \
1520
libssl-dev \
1621
libcurl4-openssl-dev \
1722
libstdc++-10-dev
1823

24+
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 100 && \
25+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-12 100 && \
26+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && \
27+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
28+
1929
WORKDIR /root
2030

2131
# ==============================================================================
@@ -74,7 +84,12 @@ RUN apt-get update \
7484
bash \
7585
curl \
7686
ca-certificates \
77-
build-essential \
87+
gcc-12 \
88+
g++-12 \
89+
make \
90+
xz-utils \
91+
bzip2 \
92+
libc6-dev \
7893
pkg-config \
7994
libssl-dev \
8095
libstdc++-10-dev \
@@ -87,6 +102,9 @@ RUN apt-get update \
87102
&& rm -rf /tmp/* \
88103
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
89104

105+
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 100 && \
106+
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-12 100
107+
90108
# Install LLVM 20 (for clang-format) and latest git (custom, newer versions)
91109
RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" > /etc/apt/sources.list.d/llvm20.list \
92110
&& curl -sSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

0 commit comments

Comments
 (0)