ERROR: failed to solve: node:18-alpine解决办法

利用命令:

docker build -t welcome-to-docker .

创建容器时遇到如下报错:

ERROR: failed to solve: node:18-alpine: failed to resolve source metadata for docker.io/library/node:18-alpine: failed to authorize: failed to fetch oauth token: Post "https://auth.docker.io/token": dial tcp [2a03:2880:f112:83:face:b00c:0:25de]:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

考虑由于网络问题导致Docker 无法从 Docker Hub 直接拉取 node:18-alpine 镜像。

解决方式:

利用命令手动拉取 node:18-alpine 镜像:

docker pull node:18-alpine

运行以上命令后,可以正常创建镜像、运行容器。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值