美文网首页
docker 镜像下安装Vim

docker 镜像下安装Vim

作者: music_520 | 来源:发表于2018-09-19 12:33 被阅读0次

    首先,进入docker镜像
    #进入镜像命令
    docker exec -it 镜像Id或镜像name /bin/bash
    配置国内镜像源
    实际在使用过程中,运行 apt-get update,然后执行 apt-get install -y vim,下载地址由于是海外地址,下载速度异常慢而且可能中断更新流程,所以做下面配置:
    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

    安装vim
    #安装命令
    apt-get install -y vim

    相关文章

      网友评论

          本文标题:docker 镜像下安装Vim

          本文链接:https://www.haomeiwen.com/subject/jdgmnftx.html