国内用户如何加速容器内的包安装

待验证

  • 备份sources.list文件
    cp /etc/apt/sources.list /etc/apt/sources.list.bak
  • 修改sources.list源
    cat > /etc/apt/sources.list

  • 粘贴阿里云源内容
    deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
  • Ctrl + c 退出粘贴
    apt-get update
评论数量: 0

0
点赞
221
浏览
0
评论

贡献 65