如何解决docker认证问题failed to authorize:failed to fetch oauth token
docker认证问题failed to authorize:failed to fetch oauth token
- 报错信息[bash1]
解决方案
- 全局代理打开
- “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]

总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
教你在docker 中搭建 PHP8 + Apache 环境的过程
这篇文章主要介绍了docker中搭建 PHP8 + Apache 环境,文章以安装 pdo-mysql 扩展为例介绍php安装扩展的详细过程,需要的朋友可以参考下2022-03-03
docker-compose部署nacos 2.2.3的详细过程
这篇文章主要介绍了docker-compose部署nacos 2.2.3的详细过程,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2023-11-11
docker安装nacos2.2.4图文详解(含:nacos容器启动参数、环境变量、常见问题整理)
文章详细介绍了如何在Docker中下载、安装和配置Nacos 2.2.4,包括在线和离线安装步骤、使用不同网络模式(如Host模式)以及一些常见问题的解决方法,感兴趣的朋友跟随小编一起看看吧2025-02-02


最新评论