赞
踩
在制作docker镜像的时候出现如下报错:
xxx@ubuntu:~/Desktop/a$ docker build -t kubia .
Sending build context to Docker daemon 3.072kB
Step 1/3 : FROM node:7
7: Pulling from library/node
ad74af05f5a2: Pulling fs layer
2b032b8bbe8b: Pulling fs layer
a9a5b35f6ead: Pulling fs layer
3245b5a1c52c: Waiting
afa075743392: Waiting
9fb9f21641cd: Waiting
3f40ad2666bc: Waiting
49c0ed396b49: Waiting
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/d9/d9aed20b68a4a40a396dc03a881c43531097404838e4dc60dbb7ed29f95974aa/data?verify=1592452748-wuYEctOEGXEsPBMLeTk2m6T5on4%3D: dial tcp 104.18.122.25:443: i/o timeout
出错原因
虚拟机中系统时间不同步,需要进行时间同步
解决方案
执行如下命令:
ntpdate time.windows.com
运行结果
yjh@ubuntu:~/Desktop/a$ sudo ntpdate time.windows.com 17 Jun 20:26:53 ntpdate[26425]: adjust time server 40.81.94.65 offset -0.055074 sec yjh@ubuntu:~/Desktop/a$ docker build -t kubia . Sending build context to Docker daemon 3.072kB Step 1/3 : FROM node:7 7: Pulling from library/node ad74af05f5a2: Pull complete 2b032b8bbe8b: Pull complete a9a5b35f6ead: Pull complete 3245b5a1c52c: Pull complete afa075743392: Pull complete 9fb9f21641cd: Pull complete 3f40ad2666bc: Pull complete 49c0ed396b49: Pull complete Digest: sha256:af5c2c6ac8bc3fa372ac031ef60c45a285eeba7bce9ee9ed66dad3a01e29ab8d Status: Downloaded newer image for node:7 ---> d9aed20b68a4 Step 2/3 : ADD app.js /app.js ---> a3db44cf2baf Step 3/3 : ENTRYPOINT ["node", "app.js"] ---> Running in e3d35396f288 Removing intermediate container e3d35396f288 ---> 8071fb59358e Successfully built 8071fb59358e Successfully tagged kubia:latest
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。