Docker容器里无法使用Xxx命令

Linux系统 apt-get 命令的使用:安装、更新、卸载软件包:https://blog.csdn.net/xietansheng/article/details/80044644


1 更新apt软件源

apt-get update

2 下载对应的Xxx即可

apt-get install vim
apt-get install tree
apt-get install yum

3 下载缓慢换源

 

3.1 查看所用的源

vim /etc/apt/sources.list

3.2 备份原来的源

mv /etc/apt/sources.list /etc/apt/sources.list.bak

3.3 修改为国内源

> 输出重定向;>> 输出追加重定向

echo "" > /etc/apt/sources.list
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

 

deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib


 https://blog.csdn.net/huangbaokang/article/details/98029026

你可能感兴趣的:(Docker)