解决docker认证问题 failed to authorize: failed to fetch oauth token

  • 报错信息[bash1]
  • 解决方案
  1. 全局代理打开
  2. “buildkit”: false ,见[图1]

[bash1]

>docker build -t ffpg .
[+] Building 71.8s (3/3) FINISHED                                                                  docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 23.36kB                                                                            0.0s
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 17)                                    0.0s
 => ERROR [internal] load metadata for docker.io/library/ubuntu:20.04                                             23.5s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                      0.0s
------
 > [internal] load metadata for docker.io/library/ubuntu:20.04:
------

 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 17)
Dockerfile:8
--------------------
   6 |     #
   7 |     #
   8 | >>> FROM        ubuntu:20.04 AS base
   9 |
  10 |     WORKDIR     /tmp/workdir
--------------------
ERROR: failed to solve: ubuntu:20.04: failed to resolve source metadata for docker.io/library/ubuntu:20.04: failed to authorize: failed to fetch oauth token: Post "https://auth.docker.io/token": dial tcp 69.63.176.15: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.

[图1]
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值