docker容器内安装yum,vim等命令,以及配置ls指令

  • 使用国内镜像
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指令
apt-get update
  • 安装yum命令
apt-get install vim
  • 添加ls命令
vim ~/.bashrc
  • 在最后一行添加
alias ll='ls $LS_OPTIONS -l'
  • 使之生效
source ~/.bashrc

 

安装ping指令为            apt-get install iputils-ping;

安装ifconfig指令为      apt-get install net-tools,

以此类推,安装你需要的工具。

 

 

 

你可能感兴趣的:(CentOs,docker)