背景
Dockerfile 如下:
FROM eclipse-temurin:17-jdk-centos7
。。。
使用 Docker 客户端执行上述 Dockerfile 构建时报错:
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决
通过查阅资料,有如下解决办法。
方法 1:【无效…】修改为阿里云 Docker 镜像仓库
本来我用的就是阿里云镜像仓库,其它镜像也试了几个,还是失败。
失败日志如下:
- 先走配置的阿里云 Docker 镜像仓库: Trying to pull eclipse-temurin from https://3e1lhgo4.mirror.aliyuncs.com/
- 阿里云 Docker 镜像仓库,提示 manifest unknown: Atte