File tree Expand file tree Collapse file tree 2 files changed +7
-19
lines changed
Expand file tree Collapse file tree 2 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -158,20 +158,14 @@ FROM base AS clang
158158# This is not inherited from base image, ensure no manual interaction needed.
159159ARG DEBIAN_FRONTEND=noninteractive
160160
161- # Some build dependencies require GCC to be also available.
162- RUN <<EOF
163- apt-get update
164- apt-get install -y --no-install-recommends gcc g++
165- apt-get clean
166- rm -rf /var/lib/apt/lists/*
167- EOF
168-
169161# Install Clang. Use the LLVM apt repository to access the latest versions. We
170162# must repeat the DEBIAN_VERSION argument here, as it is not inherited from the
171- # base or source images.
163+ # base or source images. Some build dependencies require GCC to be also available.
172164ARG DEBIAN_VERSION
173165ARG CLANG_VERSION
174166RUN <<EOF
167+ apt-get update
168+ apt-get install -y --no-install-recommends gcc g++
175169curl --no-progress-meter https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm.gpg
176170printf "%s\n %s\n " \
177171 "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
Original file line number Diff line number Diff line change @@ -143,21 +143,15 @@ FROM base AS clang
143143# This is not inherited from base image, ensure no manual interaction needed.
144144ARG DEBIAN_FRONTEND=noninteractive
145145
146- # Some build dependencies require GCC to be also available.
147- RUN <<EOF
148- apt-get update
149- apt-get install -y --no-install-recommends gcc g++
150- apt-get clean
151- rm -rf /var/lib/apt/lists/*
152- EOF
153-
154- # Install Clang.
146+ # Install Clang. Some build dependencies require GCC to be also available.
155147ARG CLANG_VERSION
156148RUN <<EOF
157149apt-get update
158150apt-get install -y --no-install-recommends \
159151 clang-${CLANG_VERSION} \
160- llvm-${CLANG_VERSION}
152+ llvm-${CLANG_VERSION} \
153+ gcc \
154+ g++
161155apt-get clean
162156rm -rf /var/lib/apt/lists/*
163157update-alternatives \
You can’t perform that action at this time.
0 commit comments