docker容器内运行apt-get报 Err http://archive.ubuntu.com trusty InRelease 错误

docker 13420 2019-02-25 10:32

 

修改
/etc/resolv.conf
追加
nameserver 8.8.8.8 或 nameserver 114.114.114.114

 

重新启动

sudo reboot

 

 

不行的话编辑

 

vim  /etc/apt/sources.list

 

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse  
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse  
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse  
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse  
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse  
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse  
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse  
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse  
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse  
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse  
 

文章评论