[Error Msg] Step 4/7 : RUN yum makecache && yum install -y --skip-broken libvirt libguestfs-tools xz expect openssl && yum clean all ---> Running in c443a95dbd5f CentOS-8 - AppStream2.2 kB/s | 2.5 MB 19:23 Errors during downloading metadata for repository 'AppStream': - Curl error (28): Timeout was reached for http://mirror.centos.org/centos/8/AppStream/aarch64/os/repodata/ce3501f14219... [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds] - Curl error (28): Timeout was reached for http://mirror.centos.org/centos/8/AppStream/aarch64/os/repodata/cc0e75f5237c... [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds] - Curl error (18): Transferred a partial file for http://mirror.centos.org/centos/8/AppStream/aarch64/os/repodata/ce3501f14219... [transfer closed with 1750223 bytes remaining to read] Error: Failed to download metadata for repo 'AppStream': Yum repo downloading error: Downloading error(s): repodata/cc0e75f5237c3f5ddfea6ab0de1056df5bb8bbf1273b5ecb907ed7c1c72897f3-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/ce3501f14219e71c21c1e40c6f91ba41bd37b59345c5a7dd6d680ef4b279b95a-filelists.xml.gz - Cannot download, all mirrors were already tried without success
Signed-off-by: Yu Chuan 13186087857@163.com --- container/qcow2rootfs/Dockerfile | 4 +- .../etc/yum.repos.d/CentOS-AltArch-7.repo | 43 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 container/qcow2rootfs/root/etc/yum.repos.d/CentOS-AltArch-7.repo
diff --git a/container/qcow2rootfs/Dockerfile b/container/qcow2rootfs/Dockerfile index a0f8b042520b..38418c7eb226 100644 --- a/container/qcow2rootfs/Dockerfile +++ b/container/qcow2rootfs/Dockerfile @@ -1,12 +1,14 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-FROM centos:8 +FROM centos:7
MAINTAINER Yu Chuan 13186087857@163.com, Shi Zhichao angus_robot@163.com
RUN rpm --import /etc/pki/rpm-gpg/RPM*
+RUN rm -rf /etc/yum.repos.d/* +COPY root / RUN yum makecache && \ yum install -y --skip-broken libvirt libguestfs-tools xz expect openssl && \ yum clean all diff --git a/container/qcow2rootfs/root/etc/yum.repos.d/CentOS-AltArch-7.repo b/container/qcow2rootfs/root/etc/yum.repos.d/CentOS-AltArch-7.repo new file mode 100644 index 000000000000..b99c0a60895d --- /dev/null +++ b/container/qcow2rootfs/root/etc/yum.repos.d/CentOS-AltArch-7.repo @@ -0,0 +1,43 @@ +# CentOS-Base.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# +# If the mirrorlist= does not work for you, as a fall back you can try the +# remarked out baseurl= line instead. +# +# + +[base] +name=CentOS-$releasever - Base - mirrors.huaweicloud.com +baseurl=https://mirrors.huaweicloud.com/centos-altarch/7/os/$basearch/ +#mirrorlist=https://mirrorlist.centos.org/?release=$releasever&arch=$basearch&re... +gpgcheck=0 +gpgkey=https://mirrors.huaweicloud.com/centos-altarch/7/os/$basearch/RPM-GPG-KEY-Ce... + +#released updates +[updates] +name=CentOS-$releasever - Updates - mirrors.huaweicloud.com +baseurl=https://mirrors.huaweicloud.com/centos-altarch/7/updates/$basearch/ +#mirrorlist=https://mirrorlist.centos.org/?release=$releasever&arch=$basearch&re... +gpgcheck=0 +gpgkey=https://mirrors.huaweicloud.com/centos-altarch/7/os/$basearch/RPM-GPG-KEY-Ce... + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras - mirrors.huaweicloud.com +baseurl=https://mirrors.huaweicloud.com/centos-altarch/7/extras/$basearch/ +#mirrorlist=https://mirrorlist.centos.org/?release=$releasever&arch=$basearch&re... +gpgcheck=0 +gpgkey=https://mirrors.huaweicloud.com/centos-altarch/7/os/$basearch/RPM-GPG-KEY-Ce... + +#additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus - mirrors.huaweicloud.com +baseurl=https://mirrors.huaweicloud.com/centos-altarch/7/centosplus/$basearch/ +#mirrorlist=https://mirrorlist.centos.org/?release=$releasever&arch=$basearch&re... +gpgcheck=0 +enabled=0 +gpgkey=https://mirrors.huaweicloud.com/centos-altarch/7/os/$basearch/RPM-GPG-KEY-Ce...