1.解决centos报错Failed to set locale, defaulting to C.UTF-8问题
1.在容器中执行以下命令
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile
echo "export LC_CTYPE=en_US.UTF-8" >> /etc/profile
source /etc/profile
2.解决centos报错Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist问题
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum update -y