zoukankan      html  css  js  c++  java
  • 75)docker 相关一些备忘

    1- 国内加速

    • 1 Daocloud
    daocloud: curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io  #写入加速地址
    systemctl daemon-reload
    systemctl restart docker #重启服务
    
    • 2 qiniu
    cat << EOF >> /etc/docker/daemon.json
    {
      "registry-mirrors": [
        "https://dockerhub.azk8s.cn",
        "https://reg-mirror.qiniu.com",
        "https://registry.docker-cn.com"
      ]
    }
    EOF
    systemctl daemon-reload
    systemctl restart docker #重启服务
    

    2- docker-ce 国内源

    • 1 centos
    cat <<EOF >/etc/yum.repos.d/repo.repo
    [docker-ce]
    name=docker-ce
    baseurl = https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/x86_64/stable/
    enabled=1
    gpgcheck=0
    EOF
    yum install -y docker-ce  #安装docker-ce
    
    • 2 阿里源
    yum remove docker docker-common container-selinux docker-selinux docker-engine  #卸载旧版
    yum install -y yum-utils device-mapper-persistent-data lvm2 #安装依赖包
    yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo #配置阿里源
    yum makecache fast
    yum -y install docker-ce
    
    • 3 ubuntu
    apt-get update
    apt-get -y install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg |  apt-key add -
    add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
    apt-get update
    apt-get install docker-ce
    
  • 相关阅读:
    iOS系统中XML&JSON解析的代码实现
    ViewController之间如何传值
    如何归档自定义对象的数组
    一个小问题
    阶段性总结
    c语言以二进制的方式向文件读写一组数据
    C语言复杂声明,指针的复杂用法
    C语言中的getchar和putchar
    C语言结构体
    常量指针 和 指针常量
  • 原文地址:https://www.cnblogs.com/lemanlai/p/13096397.html
Copyright © 2011-2022 走看看