ClickHouse/docker/test/util/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
2.2 KiB
Docker
Raw Normal View History

2021-09-24 10:48:28 +00:00
# docker build -t clickhouse/test-util .
FROM ubuntu:22.04
# ARG for quick switch to a given ubuntu mirror
ARG apt_archive="http://archive.ubuntu.com"
RUN sed -i "s|http://archive.ubuntu.com|$apt_archive|g" /etc/apt/sources.list
2024-11-26 04:11:14 +00:00
ARG LLVM_APT_VERSION="1:19.1.4"
2024-11-20 16:28:40 +00:00
ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=19
RUN apt-get update \
&& apt-get install \
2024-07-17 00:11:09 +00:00
sudo \
apt-transport-https \
apt-utils \
ca-certificates \
2022-11-25 10:37:30 +00:00
curl \
dnsutils \
gnupg \
iputils-ping \
lsb-release \
wget \
--yes --no-install-recommends --verbose-versions \
&& export LLVM_PUBKEY_HASH="bda960a8da687a275a2078d43c111d66b1c6a893a3275271beedf266c1ff4a0cdecb429c7a5cccf9f486ea7aa43fd27f" \
&& wget -nv -O /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key \
&& echo "${LLVM_PUBKEY_HASH} /tmp/llvm-snapshot.gpg.key" | sha384sum -c \
&& apt-key add /tmp/llvm-snapshot.gpg.key \
&& export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \
2022-11-25 10:37:30 +00:00
&& echo "deb https://apt.llvm.org/${CODENAME}/ llvm-toolchain-${CODENAME}-${LLVM_VERSION} main" >> \
/etc/apt/sources.list \
&& apt-get update \
2024-11-26 04:17:50 +00:00
&& apt-get satisfy --yes --no-install-recommends "llvm-${LLVM_VERSION} (>= ${LLVM_APT_VERSION})" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
2024-02-08 23:15:52 +00:00
# Install cmake 3.20+ for Rust support
2022-11-25 10:37:30 +00:00
# Used https://askubuntu.com/a/1157132 as reference
RUN curl -s https://apt.kitware.com/keys/kitware-archive-latest.asc | \
gpg --dearmor - > /etc/apt/trusted.gpg.d/kitware.gpg && \
echo "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" >> /etc/apt/sources.list
# initial packages
RUN apt-get update \
&& apt-get install \
bash \
bsdmainutils \
build-essential \
git \
gperf \
moreutils \
nasm \
pigz \
rename \
software-properties-common \
tzdata \
--yes --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
COPY --from=clickhouse/cctools:0d6b90a7a490 /opt/gdb /opt/gdb
ENV PATH="/opt/gdb/bin:${PATH}"