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 . 就成功生成镜像了