日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > centos >内容正文

centos

【Centos 8】【Centos 7】【Docker】 添加 DockerHub 的镜像地址

發(fā)布時(shí)間:2024/9/19 centos 74 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【Centos 8】【Centos 7】【Docker】 添加 DockerHub 的镜像地址 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

前言

  • CentOS Linux release 8.2
  • CentOS Linux release 7.6
  • 【Centos 8】【Centos 7】【Docker】 安裝 RabbitMQ時(shí),拉取docker IMAGE 階段很慢。在國(guó)內(nèi),從 DockerHub 拉取鏡像時(shí)經(jīng)常會(huì)遇到這個(gè)問題。解決這個(gè)問題,除了等之外,還可以添加 DockerHub 的鏡像地址提高拉取速度。

添加 DockerHub 的鏡像地址

  • 編輯 /etc/docker/daemon.json 內(nèi)容如下(如果文件不存在手動(dòng)創(chuàng)建):
  • shell> vi /etc/docker/daemon.json ------------------------------------------------------------------------------------------------------------------------------------------------------------ {"registry-mirrors":["https://reg-mirror.qiniu.com","https://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"] } ------------------------------------------------------------------------------------------------------------------------------------------------------------

    或者:

    shell> tee /etc/docker/daemon.json <<EOF {"registry-mirrors":["https://reg-mirror.qiniu.com","https://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"] } EOF
  • 重啟動(dòng)docker服務(wù):
  • shell> systemctl daemon-reload shell> systemctl restart docker
  • 查看加速器是否生效
  • shell> docker info Client:Debug Mode: falseServer:Containers: 4...Registry Mirrors:https://reg-mirror.qiniu.com/https://hub-mirror.c.163.com/https://docker.mirrors.ustc.edu.cn/Live Restore Enabled: false

    參考

    http://mirrors.ustc.edu.cn/help/dockerhub.html?highlight=docker

    總結(jié)

    以上是生活随笔為你收集整理的【Centos 8】【Centos 7】【Docker】 添加 DockerHub 的镜像地址的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。