@@ -2,4 +2,7 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+[ "$(arch)" == "x86_64" ] &&
- sed -i 's#archlinuxarm/$arch/$repo#archlinux/$repo/os/$arch#g' root/etc/pacman.d/mirrorlist
how about use $arch directly no need judge
aarch64 also support this mirror,but will show too much error message when build archlinux images as follows, so judge to change in x84.
downloading zsh-5.8-1-aarch64.pkg.tar.xz... error: failed retrieving file 'perl-error-0.17029-2-any.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error:404 downloading perl-error-0.17029-2-any.pkg.tar.xz... error: failed retrieving file 'perl-timedate-2.33-2-any.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading perl-timedate-2.33-2-any.pkg.tar.xz... error: failed retrieving file 'perl-mailtools-2.21-4-any.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading perl-mailtools-2.21-4-any.pkg.tar.xz... error: failed retrieving file 'git-2.29.2-1-aarch64.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading git-2.29.2-1-aarch64.pkg.tar.xz... error: failed retrieving file 'rsync-3.2.3-1-aarch64.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading rsync-3.2.3-1-aarch64.pkg.tar.xz... error: failed retrieving file 'gc-8.0.4-4-aarch64.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading gc-8.0.4-4-aarch64.pkg.tar.xz... error: failed retrieving file 'guile-2.2.6-2-aarch64.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404 downloading guile-2.2.6-2-aarch64.pkg.tar.xz... error: failed retrieving file 'vim-runtime-8.2.1704-1-aarch64.pkg.tar.xz' from mirrors.tuna.tsinghua.edu.cn : The requested URL returned error: 404
sed -i 's#archlinuxarm/$arch/$repo#archlinux/$repo/os/$arch#g' root/etc/pacman.d/mirrorlist
Thanks, Shenwei
docker build -t archlinux:testbed .
2.23.0