情景:
服务器docker Pull 拉不下来
docker pull easzlab/kubeasz-k8s-bin:v1.31.2
Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2025-01-14 17:06:35 [ezdown:767] ERROR Action failed: download_all
解决思路:
自己的windows电脑,翻出去,下载镜像,并上传到服务器。
解决方法
一、自己电脑下载镜像
1. 下载
docker pull easzlab/kubeasz-k8s-bin:v1.31.2
v1.31.2: Pulling from easzlab/kubeasz-k8s-bin
1b7ca6aea1dd: Pull complete
45a34e19e74f: Pull complete
43cc5c8537f0: Pull complete
Digest: sha256:5f46fd9f0445071e47ee15123ef5794b85360cdea25a57235c82dd156174775e
Status: Downloaded newer image for easzlab/kubeasz-k8s-bin:v1.31.2
docker.io/easzlab/kubeasz-k8s-bin:v1.31.2
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
easzlab/kubeasz-k8s-bin v1.31.2 f333a32afa49 2 months ago 1.14GB
devexdev/8-jdk-alpine latest 0ad2ef3a42bc 5 years ago 180MB
2. 打包
docker save f333a32afa49 > ezlab.tar
二、到服务器上传镜像
1. 上传
[root@PRD-MS-K8S01 ~]# docker load < ezlab.tar
1ad27bdd166b: Loading layer [==================================================>] 5.865MB/5.865MB
31431a62d13b: Loading layer [==================================================>] 2.56kB/2.56kB
7a54f7dfde7c: Loading layer [==================================================>] 1.135GB/1.135GB
Loaded image ID: sha256:f333a32afa49e2c47c981392a03013c7e2db2c4f25711b3c8e000168cfacb012
[root@PRD-MS-K8S01 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> f333a32afa49 2 months ago 1.14GB
2. 打标签
[root@PRD-MS-K8S01 ~]# docker tag f333a32afa49 easzlab/kubeasz-k8s-bin:v1.31.2
[root@PRD-MS-K8S01 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
easzlab/kubeasz-k8s-bin v1.31.2 f333a32afa49 2 months ago 1.14GB