最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Docker運(yùn)行hello-world鏡像失敗或超時的問題

 更新時間:2024年09月18日 10:20:07   作者:wang-1303  
在安裝Docker并嘗試運(yùn)行hello-world時,可能會遇到超時問題,這通常是由于默認(rèn)的鏡像源訪問速度慢造成的,解決這個問題的辦法是更換鏡像源,雖然許多人推薦使用阿里云的鏡像源,對Docker hello-world超時問題感興趣的朋友一起看看吧

docker run hello-world時超時告警

? 跟著官方文檔進(jìn)行docker安裝時,測試docker是否運(yùn)行成功執(zhí)行docker run hello-world時,結(jié)果和別人的不一樣

正常情況:

我們的:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Retrying in 10 seconds 
docker: error pulling image configuration: download failed after attempts=6: dial tcp 128.242.245.93:443: connect: connection refused.
See 'docker run --help'.

原因:就是我們的鏡像源不行,需要更換鏡像源

但是我們就算知道原因,去找度娘會發(fā)現(xiàn)大部分都是說更換阿里的鏡像源,但是我們嘗試之后并沒有作用

常規(guī)方案沒作用

#針對Docker客戶端版本大于 1.10.0 的用戶
#您可以通過修改daemon配置文件/etc/docker/daemon.json來使用加速器
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://5nkcn10r.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

2.1、解決方案

配置加速地址:設(shè)置registry mirror

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": [
        "https://do.nark.eu.org",
        "https://dc.j8.work",
        "https://docker.m.daocloud.io",
        "https://dockerproxy.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.nju.edu.cn"
    ]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
systemctl status docker

重啟完docker之后檢查registry mirror剛剛配置的加速地址是否成功

[root@wzy1303 docker]# docker info
Client: Docker Engine - Community
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 3.10.0-1160.119.1.el7.x86_64
 Operating System: CentOS Linux 7 (Core)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 2.761GiB
 Name: wzy1303
 ID: 74efae68-ef43-45a9-b547-ffa2c3805423
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: inkling1303
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://do.nark.eu.org/
  https://dc.j8.work/
  https://docker.m.daocloud.io/
  https://dockerproxy.com/
  https://docker.mirrors.ustc.edu.cn/
  https://docker.nju.edu.cn/
 Live Restore Enabled: false

可以看到我們已經(jīng)配置成功:

運(yùn)行docker run hello-world,成功運(yùn)行

[root@wzy1303 docker]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete 
Digest: sha256:53cc4d415d839c98be39331c948609b659ed725170ad2ca8eb36951288f81b75
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/
For more examples and ideas, visit:
 https://docs.docker.com/get-started/
#查看是否成功拉取hello-world鏡像
[root@wzy1303 docker]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
hello-world   latest    d2c94e258dcb   15 months ago   13.3kB
[root@wzy1303 docker]# docker images -a
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
hello-world   latest    d2c94e258dcb   15 months ago   13.3kB
[root@wzy1303 docker]# docker images -aq
d2c94e258dcb

到此這篇關(guān)于Docker運(yùn)行hello-world鏡像失敗或超時的問題的文章就介紹到這了,更多相關(guān)Docker hello-world超時內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 如何使用docker搭建upload-labs

    如何使用docker搭建upload-labs

    upload-labs是一個使用php語言編寫的,專門收集滲透測試和CTF中遇到的各種上傳漏洞的靶場,旨在幫助大家對上傳漏洞有一個全面的了解,本文給大家介紹使用 Docker 搭建 upload-labs 的步驟,感興趣的朋友一起看看吧
    2024-03-03
  • Docker部署portainer的詳細(xì)步驟

    Docker部署portainer的詳細(xì)步驟

    Portainer是一個輕量級的docker環(huán)境管理UI,可以用來管理docker宿主機(jī)和docker swarm集群,今天通過本文給大家介紹Docker部署portainer的步驟,感興趣的朋友一起看看吧
    2022-01-01
  • Docker搭建服務(wù)器監(jiān)控面板的實(shí)現(xiàn)示例

    Docker搭建服務(wù)器監(jiān)控面板的實(shí)現(xiàn)示例

    Docker服務(wù)器監(jiān)控面板是一種用于監(jiān)控容器運(yùn)行情況的工具,本文主要介紹了Docker搭建服務(wù)器監(jiān)控面板的實(shí)現(xiàn)示例,具有一定的參考價值,感興趣的可以了解一下
    2024-01-01
  • docker中的jenkins配置sonarQube的過程

    docker中的jenkins配置sonarQube的過程

    SonarQube是一個開源的代碼分析平臺,用來持續(xù)分析和評測項(xiàng)目源代碼的質(zhì)量,通過SonarQube可以檢測出項(xiàng)目中重復(fù)代碼,潛在bug,?代碼規(guī)范,安全性漏洞等問題,并通過SonarQube?web?UI展示出來,這篇文章主要介紹了docker中的jenkins配置sonarQube,需要的朋友可以參考下
    2023-08-08
  • Docker查看容器IP地址的方法實(shí)現(xiàn)

    Docker查看容器IP地址的方法實(shí)現(xiàn)

    本文主要介紹了Docker查看容器IP地址的方法實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-06-06
  • Docker安裝php及yaf擴(kuò)展文件內(nèi)容

    Docker安裝php及yaf擴(kuò)展文件內(nèi)容

    這篇文章主要為大家介紹了Docker安裝php及yaf擴(kuò)展文件內(nèi)容,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-11-11
  • Ubuntu正確安裝Docker和Docker?Compose的步驟詳細(xì)講解

    Ubuntu正確安裝Docker和Docker?Compose的步驟詳細(xì)講解

    Docker Compose是一個用于定義和運(yùn)行多容器Docker應(yīng)用的工具,這篇文章主要介紹了Ubuntu正確安裝Docker和Docker?Compose的相關(guān)資料,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2025-11-11
  • 使用Docker快速搭建你的Gitbook

    使用Docker快速搭建你的Gitbook

    這篇文章主要介紹了使用Docker快速搭建你的Gitbook的相關(guān)資料,需要的朋友可以參考下
    2023-11-11
  • 如何在Ubuntu安裝docker以及一些常見報錯

    如何在Ubuntu安裝docker以及一些常見報錯

    這篇文章主要介紹了在Ubuntu上安裝Docker的步驟,包括前置工作、安裝、檢查安裝結(jié)果、常見報錯處理以及一些實(shí)用的配置和修改,如修改鏡像源和目錄,需要的朋友可以參考下
    2025-04-04
  • docker鏡像訪問本地elasticsearch端口操作

    docker鏡像訪問本地elasticsearch端口操作

    這篇文章主要介紹了docker鏡像訪問本地elasticsearch端口操作,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-11-11

最新評論

岐山县| 河西区| 晋中市| 台中市| 太和县| 万全县| 探索| 永吉县| 宜春市| 囊谦县| 泸定县| 长乐市| 新民市| 万全县| 枝江市| 富裕县| 中方县| 嘉兴市| 长乐市| 左贡县| 马龙县| 吉林省| 阿克| 西青区| 保康县| 龙州县| 勃利县| 浠水县| 丹凤县| 开封市| 朝阳区| 安图县| 四平市| 三明市| 潞城市| 建瓯市| 新田县| 蒙阴县| 惠东县| 周宁县| 永安市|