Skip to content

Commit a8b7377

Browse files
authored
Merge pull request #22055 from ClickHouse/aku/llvm-cloudflare-master
quick fix for broken resolution of apt.llvm.org on Yandex infra
2 parents 18c9167 + 4c2278c commit a8b7377

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

docker/packager/binary/Dockerfile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@ FROM ubuntu:20.04
44
ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11
55

66
RUN apt-get update \
7-
&& apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \
7+
&& apt-get install \
8+
apt-transport-https \
9+
apt-utils \
10+
ca-certificates \
11+
dnsutils \
12+
gnupg \
13+
iputils-ping \
14+
lsb-release \
15+
wget \
816
--yes --no-install-recommends --verbose-versions \
17+
&& cat /etc/resolv.conf \
18+
&& echo "nameserver 1.1.1.1" >> /etc/resolv.conf \
19+
&& nslookup -debug apt.llvm.org \
20+
&& ping -c1 apt.llvm.org \
21+
&& wget -nv --retry-connrefused --tries=10 -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \
922
&& export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \
10-
&& wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \
1123
&& echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \
1224
&& apt-key add /tmp/llvm-snapshot.gpg.key \
1325
&& export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \
14-
&& echo "deb [trusted=yes] http://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \
26+
&& echo "deb [trusted=yes] https://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \
1527
/etc/apt/sources.list
1628

1729
# initial packages
@@ -24,7 +36,10 @@ RUN apt-get update \
2436
software-properties-common \
2537
--yes --no-install-recommends
2638

27-
RUN apt-get update \
39+
RUN cat /etc/resolv.conf \
40+
&& echo "nameserver 1.1.1.1" >> /etc/resolv.conf \
41+
&& nslookup -debug apt.llvm.org \
42+
&& apt-get update \
2843
&& apt-get install \
2944
bash \
3045
cmake \

docker/test/base/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ FROM ubuntu:20.04
44
ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11
55

66
RUN apt-get update \
7-
&& apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \
7+
&& apt-get install apt-utils ca-certificates lsb-release wget gnupg apt-transport-https \
88
--yes --no-install-recommends --verbose-versions \
9+
&& echo "nameserver 1.1.1.1" >> /etc/resolv.conf \
910
&& export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \
1011
&& wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \
1112
&& echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \
@@ -31,7 +32,8 @@ RUN curl -O https://clickhouse-builds.s3.yandex.net/utils/1/dpkg-deb \
3132
&& chmod +x dpkg-deb \
3233
&& cp dpkg-deb /usr/bin
3334

34-
RUN apt-get update \
35+
RUN echo "nameserver 1.1.1.1" >> /etc/resolv.conf \
36+
&& apt-get update \
3537
&& apt-get install \
3638
clang-${LLVM_VERSION} \
3739
debhelper \

0 commit comments

Comments
 (0)