From f092cd597ca7cd4660df253c14ff4e2de7d6161d Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Mon, 23 Sep 2024 17:10:18 +0800 Subject: [PATCH] Revert "fix(dockerfiles/bases): shrink base image size" (#432) Reverts PingCAP-QE/artifacts#431 --- dockerfiles/bases/ng-monitoring-base/Dockerfile | 5 ++--- .../bases/ng-monitoring-base/release-6.5.Dockerfile | 2 +- dockerfiles/bases/pd-base/Dockerfile | 5 ++--- dockerfiles/bases/pd-base/release-6.5.Dockerfile | 2 +- dockerfiles/bases/pingcap-base/Dockerfile | 2 +- dockerfiles/bases/skaffold.yaml | 6 +++--- dockerfiles/bases/tidb-base/Dockerfile | 4 +--- dockerfiles/bases/tidb-base/release-6.5.Dockerfile | 7 +++---- dockerfiles/bases/tiflash-base/Dockerfile | 4 +--- dockerfiles/bases/tikv-base/Dockerfile | 4 +--- dockerfiles/bases/tikv-base/fips.Dockerfile | 4 +--- dockerfiles/bases/tikv-base/release-6.5.Dockerfile | 2 +- dockerfiles/bases/tools-base/Dockerfile | 4 +--- dockerfiles/bases/tools-base/release-6.5.Dockerfile | 2 +- 14 files changed, 20 insertions(+), 33 deletions(-) diff --git a/dockerfiles/bases/ng-monitoring-base/Dockerfile b/dockerfiles/bases/ng-monitoring-base/Dockerfile index b399f69f..765cc7bc 100644 --- a/dockerfiles/bases/ng-monitoring-base/Dockerfile +++ b/dockerfiles/bases/ng-monitoring-base/Dockerfile @@ -1,5 +1,4 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE -RUN dnf install perl-interpreter -y \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install perl-interpreter -y && \ + dnf clean all diff --git a/dockerfiles/bases/ng-monitoring-base/release-6.5.Dockerfile b/dockerfiles/bases/ng-monitoring-base/release-6.5.Dockerfile index fd10a8d0..26e67c23 100644 --- a/dockerfiles/bases/ng-monitoring-base/release-6.5.Dockerfile +++ b/dockerfiles/bases/ng-monitoring-base/release-6.5.Dockerfile @@ -7,7 +7,7 @@ FROM pingcap/centos-stream:8 AS arm64 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 \ - && _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum \ + && _date=20240919 dnf upgrade -y && dnf clean all \ && 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 diff --git a/dockerfiles/bases/pd-base/Dockerfile b/dockerfiles/bases/pd-base/Dockerfile index a2b489c7..74ae9a0a 100644 --- a/dockerfiles/bases/pd-base/Dockerfile +++ b/dockerfiles/bases/pd-base/Dockerfile @@ -1,5 +1,4 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE -RUN dnf install bind-utils wget jq perl-interpreter -y \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install bind-utils wget jq perl-interpreter -y && \ + dnf clean all diff --git a/dockerfiles/bases/pd-base/release-6.5.Dockerfile b/dockerfiles/bases/pd-base/release-6.5.Dockerfile index 0df2d3ba..f5790a72 100644 --- a/dockerfiles/bases/pd-base/release-6.5.Dockerfile +++ b/dockerfiles/bases/pd-base/release-6.5.Dockerfile @@ -8,7 +8,7 @@ FROM pingcap/centos-stream:8 AS arm64 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 \ - && _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum \ + && _date=20240919 dnf upgrade -y && dnf clean all \ && 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 diff --git a/dockerfiles/bases/pingcap-base/Dockerfile b/dockerfiles/bases/pingcap-base/Dockerfile index 93b3ddd6..10ac5923 100644 --- a/dockerfiles/bases/pingcap-base/Dockerfile +++ b/dockerfiles/bases/pingcap-base/Dockerfile @@ -1,3 +1,3 @@ FROM quay.io/rockylinux/rockylinux:9.4.20240523 COPY --from=busybox:1.36.1 /bin/busybox /bin/busybox -RUN _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum +RUN _date=20240730 dnf upgrade -y && dnf clean all diff --git a/dockerfiles/bases/skaffold.yaml b/dockerfiles/bases/skaffold.yaml index f0eae59d..8ff302c6 100644 --- a/dockerfiles/bases/skaffold.yaml +++ b/dockerfiles/bases/skaffold.yaml @@ -60,7 +60,7 @@ build: cache: {} tagPolicy: customTemplate: - template: "v1.9.2" + template: "v1.9.1" cluster: concurrency: 0 randomDockerConfigSecret: false @@ -118,7 +118,7 @@ build: cache: {} tagPolicy: customTemplate: - template: "v1.9.2-fips" + template: "v1.9.1-fips" cluster: concurrency: 0 randomDockerConfigSecret: false @@ -202,7 +202,7 @@ build: path: tools-base/release-6.5.Dockerfile tagPolicy: customTemplate: - template: "v1.0.2-old" + template: "v1.0.1-old" local: useDockerCLI: true useBuildkit: true diff --git a/dockerfiles/bases/tidb-base/Dockerfile b/dockerfiles/bases/tidb-base/Dockerfile index cfc1b9e4..428372b0 100644 --- a/dockerfiles/bases/tidb-base/Dockerfile +++ b/dockerfiles/bases/tidb-base/Dockerfile @@ -1,5 +1,3 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE -RUN dnf install --allowerasing -y curl wget \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install --allowerasing -y curl wget && dnf clean all diff --git a/dockerfiles/bases/tidb-base/release-6.5.Dockerfile b/dockerfiles/bases/tidb-base/release-6.5.Dockerfile index 2a3c81e2..3e8b425d 100644 --- a/dockerfiles/bases/tidb-base/release-6.5.Dockerfile +++ b/dockerfiles/bases/tidb-base/release-6.5.Dockerfile @@ -8,11 +8,10 @@ FROM pingcap/centos-stream:8 AS arm64 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 \ - && _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum \ + && _date=20240919 dnf upgrade -y && dnf clean all \ && 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 RUN set -e && \ - dnf install bind-utils curl nmap-ncat -y \ - && dnf clean all \ - && rm -rf /var/cache/yum + dnf install bind-utils curl nmap-ncat -y && \ + dnf clean all diff --git a/dockerfiles/bases/tiflash-base/Dockerfile b/dockerfiles/bases/tiflash-base/Dockerfile index 3758231b..18e76434 100644 --- a/dockerfiles/bases/tiflash-base/Dockerfile +++ b/dockerfiles/bases/tiflash-base/Dockerfile @@ -1,5 +1,3 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE -RUN dnf install --allowerasing -y wget \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install --allowerasing -y wget && dnf clean all diff --git a/dockerfiles/bases/tikv-base/Dockerfile b/dockerfiles/bases/tikv-base/Dockerfile index ca19c5b3..b892c701 100644 --- a/dockerfiles/bases/tikv-base/Dockerfile +++ b/dockerfiles/bases/tikv-base/Dockerfile @@ -1,8 +1,6 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE # wget is requested by operator -RUN dnf install -y tzdata wget \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install -y tzdata wget && dnf clean all ENV TZ=/etc/localtime \ TZDIR=/usr/share/zoneinfo diff --git a/dockerfiles/bases/tikv-base/fips.Dockerfile b/dockerfiles/bases/tikv-base/fips.Dockerfile index df2e8bfd..d8e19864 100644 --- a/dockerfiles/bases/tikv-base/fips.Dockerfile +++ b/dockerfiles/bases/tikv-base/fips.Dockerfile @@ -1,8 +1,6 @@ ARG PINGCAP_BASE=ghcr.io/pingcap-qe/bases/pingcap-base:v1.9.1 FROM $PINGCAP_BASE # wget is requested by operator -RUN dnf install -y tzdata wget openssl \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install -y tzdata wget openssl && dnf clean all ENV TZ=/etc/localtime \ TZDIR=/usr/share/zoneinfo diff --git a/dockerfiles/bases/tikv-base/release-6.5.Dockerfile b/dockerfiles/bases/tikv-base/release-6.5.Dockerfile index 8d5ae605..2a0ca353 100644 --- a/dockerfiles/bases/tikv-base/release-6.5.Dockerfile +++ b/dockerfiles/bases/tikv-base/release-6.5.Dockerfile @@ -10,7 +10,7 @@ FROM pingcap/centos-stream:8 AS arm64 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 \ - && _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum \ + && _date=20240919 dnf upgrade -y && dnf clean all \ && 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 diff --git a/dockerfiles/bases/tools-base/Dockerfile b/dockerfiles/bases/tools-base/Dockerfile index 89f59d01..ac032e2e 100644 --- a/dockerfiles/bases/tools-base/Dockerfile +++ b/dockerfiles/bases/tools-base/Dockerfile @@ -1,5 +1,3 @@ ARG PINGCAP_BASE FROM $PINGCAP_BASE -RUN dnf install -y bind-utils wget nc \ - && dnf clean all \ - && rm -rf /var/cache/yum +RUN dnf install -y bind-utils wget nc && dnf clean all diff --git a/dockerfiles/bases/tools-base/release-6.5.Dockerfile b/dockerfiles/bases/tools-base/release-6.5.Dockerfile index 08e8adfa..88e30e2c 100644 --- a/dockerfiles/bases/tools-base/release-6.5.Dockerfile +++ b/dockerfiles/bases/tools-base/release-6.5.Dockerfile @@ -8,7 +8,7 @@ FROM pingcap/centos-stream:8 AS arm64 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 \ - && _date=20240920 dnf upgrade -y && dnf clean all && rm -rf /var/cache/yum \ + && _date=20240919 dnf upgrade -y && dnf clean all \ && 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