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