ERROR: failed to solve: java:8: failed to do request:
短信预约 -IT技能 免费直播动态提醒
问题:
通过 docker build构建SpringBoot镜像时出现如下问题:
[root@localhost docker]# docker build -t example:1.0.0 .[+] Building 36.0s (3/3) FINISHED => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build definition from dockerfile 0.0s => => transferring dockerfile: 290B 0.0s => ERROR [internal] load metadata for docker.io/library/java:8 35.9s------ > [internal] load metadata for docker.io/library/java:8:------dockerfile:2-------------------- 1 | 2 | >>> FROM java:8 3 | 4 | MAINTAINER GaoHuanjie--------------------ERROR: failed to solve: java:8: failed to do request: Head "https://ha65u7j9.mirror.aliyuncs.com/v2/library/java/manifests/8?ns=docker.io": dial tcp: lookup ha65u7j9.mirror.aliyuncs.com on 114.114.114.114:53: read udp 192.168.1.101:52193->114.114.114.114:53: i/o timeout[root@localhost docker]#
方案:
该问题由网络不好产生,可以更换网络环境尝试一下,如果还是没有解决,可以通过修改dockerfile文件FROM配置尝试一下,如下所示:
FROM openjdk:8MAINTAINER GaoHuanjieVOLUME /tmpADD dubhe-0.0.1-SNAPSHOT.jar app.jarRUN bash -c 'touch /app.jar'ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
来源地址:https://blog.csdn.net/wangshuxuncom/article/details/131267087
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341