qiuri2008

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

docker容器改变apt-get源

记得先:apt-get update

进入容器
cd /etc/apt
echo "">sources.list
echo "deb http://mirrors.163.com/ubuntu/ artful main restricted universe multiverse">>sources.list
echo "deb http://mirrors.163.com/ubuntu/ artful-security main restricted universe multiverse">>sources.list
echo "deb http://mirrors.163.com/ubuntu/ artful-updates main restricted universe multiverse">>sources.list
echo "deb http://mirrors.163.com/ubuntu/ artful-proposed main restricted universe multiverse">>sources.list
echo "deb http://mirrors.163.com/ubuntu/ artful-backports main restricted universe multiverse">>sources.list
echo "deb-src http://mirrors.163.com/ubuntu/ artful main restricted universe multiverse">>sources.list
echo "deb-src http://mirrors.163.com/ubuntu/ artful-security main restricted universe multiverse">>sources.list
echo "deb-src http://mirrors.163.com/ubuntu/ artful-updates main restricted universe multiverse">>sources.list
echo "deb-src http://mirrors.163.com/ubuntu/ artful-proposed main restricted universe multiverse">>sources.list
echo "deb-src http://mirrors.163.com/ubuntu/ artful-backports main restricted universe multiverse">>sources.list

 或者

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

 

安装Docker:

运行脚本:

脚本地址:
https://get.docker.com

 

posted on 2018-11-03 10:03  江召伟  阅读(280)  评论(0编辑  收藏  举报