-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathdockerfile_ci
More file actions
87 lines (72 loc) · 3.87 KB
/
dockerfile_ci
File metadata and controls
87 lines (72 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
FROM python:3.9.25 AS builder
WORKDIR /home
RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list \
&& echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list \
&& echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list
COPY requirements.txt /home/
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 apt-get update \
&& apt-get install -y --no-install-recommends \
locales psmisc sudo tree libgeos-dev libgflags-dev ruby-full \
libgoogle-glog-dev libsnappy-dev liblzma-dev zlib1g-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 groff \
&& wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --version 6.0.100 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& sed -i 's/# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen \
&& locale-gen \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
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.9 taos-ws-py==0.6.6 pandas psutil codecov fabric2 requests faker simplejson toml \
pexpect tzlocal distro decorator loguru hyperloglog websockets
ADD go1.23.4.linux-amd64.tar.gz \
jdk-8u144-linux-x64.tar.gz \
apache-maven-3.8.4-bin.tar.gz \
node-v20.17.0-linux-x64.tar.xz \
cmake-3.21.5-linux-x86_64.tar.gz \
/usr/local/
# Use build-time ARGs and run-time ENVs for flexibility
ARG RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
ARG RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
ARG RUST_VERSION=1.90.0
ENV RUSTUP_UPDATE_ROOT=${RUSTUP_UPDATE_ROOT}
ENV RUSTUP_DIST_SERVER=${RUSTUP_DIST_SERVER}
ENV RUST_VERSION=${RUST_VERSION}
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"
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
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
# Install coverage tools
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
# Configure SSH (optimize configuration and set permissions)
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 \
# for taosadapter start
&& mkdir -p /etc/taos
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
COPY TDinternal /home/TDinternal