TDengine/tests/ci/dockerfile_ci
kevin men 10ae72944d
docs: integrate with Pandas docs (#33350)
* docs: integrate with Pandas docs

* docs: add pandas example

* docs: modify pandas example format

* docs: upgrade taopy version

* fix(gpt): update requirements.

---------

Co-authored-by: Haojun Liao <hjliao@taosdata.com>
Co-authored-by: Haojun Liao <hjxilinx@users.noreply.github.com>
2025-10-29 18:05:22 +08:00

94 lines
No EOL
4 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Stage 1: Build Stage
FROM python:3.9 AS builder
# 设置工作目录
WORKDIR /home
# 定义变量
ARG INSTALLERS_DIR=installers
# 复制必要的文件
COPY requirements.txt /home/
COPY sources.list /etc/apt/
COPY id_ecdsa /root/.ssh/id_ecdsa
COPY id_ecdsa.pub /root/.ssh/id_ecdsa.pub
COPY id_ecdsa.pub /root/.ssh/authorized_keys
COPY .gitconfig /root/.gitconfig
RUN rm -rf /etc/apt/sources.list.d/*
# 安装基础依赖(合并命令,减少镜像层)
RUN apt-key adv --keyserver hkp://pgpkeys.eu --recv-keys 3B4FE6ACC0B21F32 \
&& apt-key adv --keyserver hkp://pgpkeys.eu --recv-keys 871920D1991BC93C \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
locales psmisc sudo tree libgeos-dev libgflags2.2 libgflags-dev ruby-full \
libgeos-dev libgoogle-glog-dev libsnappy-dev liblzma-dev libz-dev \
libjansson-dev zlib1g pkg-config build-essential valgrind rsync vim \
libjemalloc-dev openssh-server screen sshpass net-tools dirmngr gnupg \
apt-transport-https ca-certificates software-properties-common iputils-ping \
r-base r-base-dev clang-tools-16 wget lcov \
&& wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y dotnet-sdk-6.0 \
&& sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen \
&& locale-gen \
&& rm -rf /var/lib/apt/lists/*
# 配置 pip
RUN pip3 config set global.index-url http://admin:123456@192.168.0.212:3141/admin/dev/+simple/ \
&& pip3 config set global.trusted-host 192.168.0.212 \
&& pip3 install --no-cache-dir -r /home/requirements.txt \
&& pip3 install --no-cache-dir \
taospy==2.8.6 taos-ws-py==0.6.1 pandas psutil codecov fabric2 requests faker simplejson toml \
pexpect tzlocal distro decorator loguru hyperloglog websockets
# 安装 Go、JDK、Maven、Node.js优化解压路径
ADD go1.23.4.linux-amd64.tar.gz /usr/local/
ADD jdk-8u144-linux-x64.tar.gz /usr/local/
ADD apache-maven-3.8.4-bin.tar.gz /usr/local/
ADD node-v20.17.0-linux-x64.tar.xz /usr/local/
ADD cmake-3.21.5-linux-x86_64.tar.gz /usr/local/
ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
ENV RUSTUP_DIST_SERVER="https://rsproxy.cn"
ENV RUST_VERSION=1.87.0
# 安装 Rust优化安装过程
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --verbose --profile minimal --component clippy,rustfmt --default-toolchain $RUST_VERSION
COPY .cargo/config /root/.cargo/config
# 配置环境变量
ENV PATH="/usr/local/go/bin:/usr/local/node-v20.17.0-linux-x64/bin:/usr/local/apache-maven-3.8.4/bin:/usr/local/jdk1.8.0_144/bin:/root/.cargo/bin:/home/bin:/usr/local/cmake-3.21.5-linux-x86_64/bin:$PATH"
ENV JAVA_HOME="/usr/local/jdk1.8.0_144"
ENV RUSTUP_DIST_SERVER="https://rsproxy.cn" RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
RUN go env -w GOPROXY=https://goproxy.cn
ENV LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
# 配置 R 支持 Java 并安装 RJDBC
RUN R CMD javareconf JAVA_HOME=${JAVA_HOME} JAVA=${JAVA_HOME}/bin/java JAVAC=${JAVA_HOME}/bin/javac JAVAH=${JAVA_HOME}/bin/javah JAR=${JAVA_HOME}/bin/jar \
&& echo "install.packages(\"RJDBC\", repos=\"http://cran.us.r-project.org\")" | R --no-save
# 安装覆盖率工具
RUN gem install coveralls-lcov \
&& npm config -g set registry https://registry.npmmirror.com
# COPY ../.nuget /root/.nuget
# COPY ../.dotnet /root/.dotnet
# COPY ../.npm /root/.npm
# 配置 SSH优化配置并设置权限
RUN mkdir -p /root/.ssh \
&& chmod 700 /root/.ssh \
&& echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config \
&& chmod 600 /root/.ssh/id_ecdsa \
&& chmod 600 /root/.ssh/authorized_keys
RUN sh -c "rm -f /etc/localtime;ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;echo \"Asia/Shanghai\" >/etc/timezone"
# 复制应用代码
# COPY TDinternal /home/TDinternal
COPY setup.sh /home/setup.sh
RUN chmod +x /home/setup.sh