其他分享
首页 > 其他分享> > docker镜像安装vim

docker镜像安装vim

作者:互联网

在使用docker容器时,容器一般没有安装vim,就需要安装vim
apt-get install vim命令用于安装vim,但是下载过慢。

第一步 配置国内镜像源
进入某个镜像

docker images

docker run -it 73af4f97af3f /bin/bash

配置镜像源

 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

 

第二步:下载vim

apt update

apt-get install vim

 

标签:jessie,http,sources,apt,vim,etc,镜像,docker
来源: https://www.cnblogs.com/gejuncheng/p/16425580.html