diff --git a/dockerfiles/cd/builders/ng-monitoring/Dockerfile b/dockerfiles/cd/builders/ng-monitoring/Dockerfile index 392426ba..653e1055 100644 --- a/dockerfiles/cd/builders/ng-monitoring/Dockerfile +++ b/dockerfiles/cd/builders/ng-monitoring/Dockerfile @@ -7,19 +7,7 @@ # - docker build -t tidb -f Dockerfile ./tidb ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# install packages. -RUN yum update --nogpgcheck -y && \ - yum install --nogpgcheck -y epel-release deltarpm && \ - yum update --nogpgcheck -y && \ - yum groupinstall --nogpgcheck -y "Development Tools" && \ - yum install -y wget && \ - yum clean all +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder # install golang toolchain # renovate: datasource=docker depName=golang diff --git a/dockerfiles/cd/builders/pd/Dockerfile b/dockerfiles/cd/builders/pd/Dockerfile index 442c7418..c28147c4 100644 --- a/dockerfiles/cd/builders/pd/Dockerfile +++ b/dockerfiles/cd/builders/pd/Dockerfile @@ -6,23 +6,11 @@ # - docker build -t pd -f Dockerfile ./pd ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# install packages. -RUN yum update --nogpgcheck -y && \ - yum install --nogpgcheck -y epel-release deltarpm && \ - yum update --nogpgcheck -y && \ - yum groupinstall --nogpgcheck -y "Development Tools" && \ - yum install --nogpgcheck -y which && \ - yum clean all +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder # install golang toolchain # renovate: datasource=docker depName=golang -ARG GOLANG_VERSION=1.21.6 +ARG GOLANG_VERSION=1.21.13 RUN OS=linux; ARCH=$([ "$(arch)" = "x86_64" ] && echo amd64 || echo arm64); \ curl -fsSL https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz | tar -C /usr/local -xz ENV PATH /usr/local/go/bin/:$PATH diff --git a/dockerfiles/cd/builders/tidb-dashboard/Dockerfile b/dockerfiles/cd/builders/tidb-dashboard/Dockerfile index 27ec4c4c..3ea1c3e9 100644 --- a/dockerfiles/cd/builders/tidb-dashboard/Dockerfile +++ b/dockerfiles/cd/builders/tidb-dashboard/Dockerfile @@ -7,17 +7,7 @@ # - docker build -t tidb -f Dockerfile ./tidb ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# install packages. -RUN yum -y update && \ - yum -y groupinstall "Development Tools" && \ - yum -y install java-11-openjdk && \ - yum clean all +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder # install golang toolchain # renovate: datasource=docker depName=golang @@ -28,7 +18,7 @@ ENV PATH /usr/local/go/bin/:$PATH LABEL go-version="${GOLANG_VERSION}" # Install nodejs. -RUN curl -fsSL https://rpm.nodesource.com/setup_16.x | bash - +RUN curl -fsSL https://rpm.nodesource.com/setup_18.x | bash - RUN yum -y install nodejs && yum clean all RUN npm install -g pnpm@7.30.5 diff --git a/dockerfiles/cd/builders/tidb/Dockerfile b/dockerfiles/cd/builders/tidb/Dockerfile index d7a88a60..5b55907a 100644 --- a/dockerfiles/cd/builders/tidb/Dockerfile +++ b/dockerfiles/cd/builders/tidb/Dockerfile @@ -7,18 +7,7 @@ # - docker build -t tidb -f Dockerfile ./tidb ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# install packages. -RUN yum update --nogpgcheck -y && \ - yum install --nogpgcheck -y epel-release deltarpm && \ - yum update --nogpgcheck -y && \ - yum groupinstall --nogpgcheck -y "Development Tools" && \ - yum clean all +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder # install golang toolchain # renovate: datasource=docker depName=golang diff --git a/dockerfiles/cd/builders/tiflash/Dockerfile b/dockerfiles/cd/builders/tiflash/Dockerfile index 2eeea2d5..cbec345f 100644 --- a/dockerfiles/cd/builders/tiflash/Dockerfile +++ b/dockerfiles/cd/builders/tiflash/Dockerfile @@ -6,11 +6,7 @@ # - docker build -t tikv -f Dockerfile ./tikv ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder LABEL org.opencontainers.image.authors "wuhui.zuo@pingcap.com" LABEL org.opencontainers.image.description "binary builder for tiflash" diff --git a/dockerfiles/cd/builders/tiflow/Dockerfile b/dockerfiles/cd/builders/tiflow/Dockerfile index eccf6419..6f08f4f0 100644 --- a/dockerfiles/cd/builders/tiflow/Dockerfile +++ b/dockerfiles/cd/builders/tiflow/Dockerfile @@ -6,18 +6,7 @@ # - docker build -t dm -f Dockerfile ./tiflow ########### stage: Builder - cdc -FROM centos:7.9.2009 as builder-cdc -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo - -# install packages. -RUN yum update --nogpgcheck -y && \ - yum install --nogpgcheck -y epel-release deltarpm && \ - yum update --nogpgcheck -y && \ - yum groupinstall --nogpgcheck -y "Development Tools" && \ - yum clean all +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder-cdc # install golang toolchain # renovate: datasource=docker depName=golang diff --git a/dockerfiles/cd/builders/tikv/Dockerfile b/dockerfiles/cd/builders/tikv/Dockerfile index 53a58bad..d272a517 100644 --- a/dockerfiles/cd/builders/tikv/Dockerfile +++ b/dockerfiles/cd/builders/tikv/Dockerfile @@ -6,24 +6,23 @@ # - docker build -t tikv -f Dockerfile ./tikv ########### stage: Builder -FROM centos:7.9.2009 as builder -# CentOS 7 has reached EOL -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \ - && sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \ - && sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo +FROM quay.io/rockylinux/rockylinux:8.10.20240528 as builder # install packages. -ARG DEVTOOLSET_VER=8 -RUN yum install --nogpgcheck -y epel-release centos-release-scl deltarpm && \ - sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ - sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ - sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ - ([ "$(arch)" = "x86_64" ] || sed -i s#vault.centos.org/centos/7/sclo/#vault.centos.org/altarch/7/sclo/#g /etc/yum.repos.d/*.repo) && \ - yum update --nogpgcheck -y && \ - yum install -y git devtoolset-${DEVTOOLSET_VER} perl cmake3 unzip && \ - yum clean all && \ - ln -s /usr/bin/cmake3 /usr/bin/cmake -ENV DEVTOOLSET_VER ${DEVTOOLSET_VER} +RUN dnf install -y \ + openssl-devel \ + gcc \ + gcc-c++ \ + make \ + cmake \ + perl \ + git \ + findutils \ + curl \ + python3 --allowerasing && \ + dnf --enablerepo=crb install -y \ + libstdc++-static && \ + dnf clean all # install protoc. # renovate: datasource=github-release depName=protocolbuffers/protobuf @@ -34,7 +33,6 @@ RUN FILE=$([ "$(arch)" = "aarch64" ] && echo "protoc-${PROTOBUF_VER#?}-linux-aar # install rust toolchain RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - -y --default-toolchain none ENV PATH /root/.cargo/bin/:$PATH -LABEL devtoolset-ver="${DEVTOOLSET_VER}" ########### stage: Buiding FROM builder as building diff --git a/dockerfiles/cd/builders/tikv/fips.Dockerfile b/dockerfiles/cd/builders/tikv/fips.Dockerfile index 9ead696c..11bfa507 100644 --- a/dockerfiles/cd/builders/tikv/fips.Dockerfile +++ b/dockerfiles/cd/builders/tikv/fips.Dockerfile @@ -30,7 +30,7 @@ ARG PROTOBUF_VER=v3.15.8 RUN FILE=$([ "$(arch)" = "aarch64" ] && echo "protoc-${PROTOBUF_VER#?}-linux-aarch_64.zip" || echo "protoc-${PROTOBUF_VER#?}-linux-$(arch).zip"); \ curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/${PROTOBUF_VER}/${FILE}" && unzip "$FILE" -d /usr/local/ && rm -f "$FILE" -# Install Rustup +# install rust toolchain RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - -y --default-toolchain none ENV PATH /root/.cargo/bin/:$PATH