2023-04-16 10:11:35 +00:00
|
|
|
# docker build -t clickhouse/sqllogic-test .
|
|
|
|
ARG FROM_TAG=latest
|
|
|
|
FROM clickhouse/test-base:$FROM_TAG
|
|
|
|
|
|
|
|
RUN apt-get update --yes \
|
|
|
|
&& env DEBIAN_FRONTEND=noninteractive \
|
|
|
|
apt-get install --yes --no-install-recommends \
|
|
|
|
wget \
|
|
|
|
git \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
sqlite3 \
|
|
|
|
unixodbc \
|
|
|
|
unixodbc-dev \
|
2023-07-03 07:40:05 +00:00
|
|
|
odbcinst \
|
2023-04-16 10:11:35 +00:00
|
|
|
sudo \
|
2024-01-29 13:00:22 +00:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
|
2023-04-16 10:11:35 +00:00
|
|
|
|
|
|
|
RUN pip3 install \
|
|
|
|
numpy \
|
|
|
|
pyodbc \
|
2023-10-27 13:05:37 +00:00
|
|
|
deepdiff \
|
|
|
|
sqlglot
|
2023-04-16 10:11:35 +00:00
|
|
|
|
2024-02-21 17:52:11 +00:00
|
|
|
ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.6.20200320/clickhouse-odbc-1.1.6-Linux.tar.gz"
|
|
|
|
|
|
|
|
RUN mkdir -p /tmp/clickhouse-odbc-tmp \
|
|
|
|
&& cd /tmp/clickhouse-odbc-tmp \
|
|
|
|
&& curl -L ${odbc_driver_url} | tar --strip-components=1 -xz clickhouse-odbc-1.1.6-Linux \
|
|
|
|
&& mkdir /usr/local/lib64 -p \
|
|
|
|
&& cp /tmp/clickhouse-odbc-tmp/lib64/*.so /usr/local/lib64/ \
|
|
|
|
&& odbcinst -i -d -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbcinst.ini.sample \
|
|
|
|
&& odbcinst -i -s -l -f /tmp/clickhouse-odbc-tmp/share/doc/clickhouse-odbc/config/odbc.ini.sample \
|
|
|
|
&& sed -i 's"=libclickhouseodbc"=/usr/local/lib64/libclickhouseodbc"' /etc/odbcinst.ini \
|
|
|
|
&& rm -rf /tmp/clickhouse-odbc-tmp
|
|
|
|
|
2023-04-16 10:11:35 +00:00
|
|
|
|
|
|
|
ENV TZ=Europe/Amsterdam
|
2023-10-28 14:55:25 +00:00
|
|
|
ENV MAX_RUN_TIME=9000
|
2023-04-16 10:11:35 +00:00
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
|
|
|
|
ARG sqllogic_test_repo="https://github.com/gregrahn/sqllogictest.git"
|
|
|
|
|
|
|
|
RUN git clone --recursive ${sqllogic_test_repo}
|
|
|
|
|
|
|
|
COPY run.sh /
|
|
|
|
CMD ["/bin/bash", "/run.sh"]
|