zoukankan      html  css  js  c++  java
  • docker build时改变docker中的apt源

    # Ali apt-get source.list
    RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && 
        echo "deb-src http://archive.ubuntu.com/ubuntu xenial main restricted" >/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted" >>/etc/apt/sources.list && 
        echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted" >>/etc/apt/sources.list && 
        echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse" >>/etc/apt/sources.list && 
        echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse" >>/etc/apt/sources.list && 
        echo "deb http://archive.canonical.com/ubuntu xenial partner" >>/etc/apt/sources.list && 
        echo "deb-src http://archive.canonical.com/ubuntu xenial partner" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted" >>/etc/apt/sources.list && 
        echo "deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe" >>/etc/apt/sources.list && 
        echo "deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse" >>/etc/apt/sources.list
    
    RUN apt-get update
  • 相关阅读:
    Linux 命令笔记
    MySQL指令笔记
    悲观锁与乐观锁
    缓存在高并发场景下的常见问题
    死锁相关问题
    Java并发性和多线程
    Java同步和异步,阻塞和非阻塞
    内存溢出和内存泄漏
    JavaAndroid项目配置文件笔记
    Maven安装配置
  • 原文地址:https://www.cnblogs.com/zealousness/p/10881451.html
Copyright © 2011-2022 走看看