docker在自己构建安装vim基础命令的时候报错

错误:

^CCentOS Linux 8 - AppStream                                                      [         ===                                                              ] ---  B/s |   0  B     --:-- ETCentOS Linux 8 - AppStream                                                                                                                                   0.0  B/s |   0  B     00:10    
Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Interrupted by signal

解决方式:

关闭防火墙后需重启docker,否则会报错

systemctl stop firewalld
systemctl restart docker
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐