欢迎阅读我的笔记博客

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 #重启服务
  • 3 Docker中国官方镜像加速
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
  • 4 网易163镜像加速
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
  • 5 中科大镜像加速
{
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]     
}

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
posted @ 2020-06-11 22:09  lemanlai  阅读(119)  评论(0编辑  收藏  举报