docker official tutorial, unable to build images.docker官方教程无法生成镜像

windows docker。 根据dockder的官方tutorial教程, docker build -t getting-started . 这一步无法成功。
一直是如下报错:
21.53 error An unexpected error occurred: “https://registry.yarnpkg.com/body-parser: connect ECONNREFUSED 104.16.16.35:443”.
#8 21.53 info If you think this is a bug, please open a bug report with the information provided in “/app/yarn-error.log”.
#8 21.53 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

找了很多资料说是要改npm或者yarn的源啥的但改了还是继续报错。最后是先根据这个教程https://blog.csdn.net/zhuzbYR/article/details/111408950在win10装了yarn, 然后改了yarn的源。然后再把教程源代码里的yarn.lock文件删掉。

然后先在命令行输入yarn生成yarn.lock文件,再 docker build -t getting-started . 就成功生成镜像了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值