Docker 源配置

董雷發表於2021-12-11

docker源配置

docker安裝後無法拉取映象

報錯如下

PS D:\myself\vagrant\php\machine\Pro1\docker_lnmp\lnmp> docker-compose up -d redis
[+] Running 0/1
 - redis Error                                                                                                                                                                                   33.7s 
Error response from daemon: Get "https://registry-1.docker.io/v2/library/redis/manifests/sha256:aaf7c123077a5e45ab2328b5ef7e201b5720616efac498d55e65a7afbb96ae20": EOF

新增的配置資訊

  "registry-mirrors": [
    "https://bytkgxyr.mirror.aliyuncs.com",
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com"
  ]

圖解

docekr源配置

再次拉取

PS D:\myself\vagrant\php\machine\Pro1\docker_lnmp\lnmp> docker-compose up -d redis
[+] Running 7/7
 - redis Pulled                                                                                                                                                                                  21.0s
   - cbdbe7a5bc2a Pull complete                                                                                                                                                                   1.8s
   - dc0373118a0d Pull complete                                                                                                                                                                   1.9s 
   - cfd369fe6256 Pull complete                                                                                                                                                                   2.0s 
   - 152ffd6a3b24 Pull complete                                                                                                                                                                   3.3s 
   - 7c01860f13a3 Pull complete                                                                                                                                                                   3.3s 
   - aa6ecacd3bee Pull complete                                                                                                                                                                   3.4s 
[+] Running 3/3
 - Network lnmp_web      Created                                                                                                                                                                  0.0s 
 - Network lnmp_default  Created                                                                                                                                                                  0.1s 
 - Container redis       Started                                                                                                                                                                  0.7s
PS D:\myself\vagrant\php\machine\Pro1\docker_lnmp\lnmp> 
本作品採用《CC 協議》,轉載必須註明作者和本文連結
good good study day day up

相關文章