在容器中安装net-tools类似这样的工具是不被推荐的,因为docker自带很多命令可以代替,我们应该要保持容器内的"干净",但有时候我们需要使用centos、ubuntu等安装一些应用
~~~
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list
~~~
#更新安装源
`apt-get update `