gpt4 book ai didi

linux - 将 Docker 镜像从 Azure 容器注册表部署到 Web 应用程序容器 "failed to register layer: Error processing tar file(exit status 1)"

转载 作者:行者123 更新时间:2023-12-03 00:59:45 25 4
gpt4 key购买 nike

我尝试过最新的 Ubuntu 和 Python - 它们成功解压并安装。但是,一旦我安装更多依赖项并添加我的应用程序并将镜像推送到 Azure ACR - 就会发生此错误。

我的本​​地计算机上发生了什么?例如,我运行 Ubuntu 镜像,安装 pip3,然后在本地“docker 提交”更改,然后标记镜像并将其推送到 ACR。该图像将无法加载并出现上述错误。我可以看到上一个镜像中的段已经在注册表中,并且实际上只推送了最新的镜像段。因此,该错误似乎是在对图像进行最新更改时发生的。

完整的错误消息是:-

2020-06-25T03:14:43.517Z ERROR - failed to register layer: Errorprocessing tar file(exit status 1): Container ID 197609 cannot bemapped to a host IDErr: 0, Message: failed to register layer: Errorprocessing tar file(exit status 1): Container ID 197609 cannot bemapped to a host ID

2020-06-25T03:14:43.589Z INFO - Pull Imagefailed, Time taken: 0 Minutes and 46 Seconds

2020-06-25T03:14:43.590Z ERROR - Pulling docker image *******.azurecr.io/seistech-1:v1.0.0.15failed:

2020-06-25T03:14:43.590Z INFO - Pulling image from Dockerhub: .azurecr.io/seistech-1:v1.0.0.15 2020-06-25T03:14:43.987ZERROR - DockerApiException: Docker API responded with statuscode=InternalServerError, response={"message":"Gethttps://.azurecr.io/v2/*******-1/manifests/v1.0.0.15:unauthorized: authentication required, visithttps://aka.ms/acr/authorization for more information."}

2020-06-25T03:14:44.020Z ERROR - Image pull failed: Verify dockerimage configuration and credentials (if using private repository)

2020-06-25T03:14:46.491Z INFO - Stopping site *******-dev-containerbecause it failed during startup.

注意“身份验证消息” - 我已在 Web 应用程序中创建了系统分配的身份,并在 ACR 中分配了图像拉取权限 - 据我所知,应该不存在身份验证问题。

感谢建议 - 可供使用的诊断信息很少。

谢谢安迪,新西兰

最佳答案

就我而言,它与 npm v9 相关,并且仅在使用Azure App Service时使用。

可以将模块安装到您的node_modules目录中,并为文件所有者/创建者提供高ID。

我的解决方案:

作为一个快速解决方法,我恢复到旧版本的 npm 8.x。目前这对我有用。

发现这篇文章很有帮助 NPM-specific issues causing users remapping exceptions

关于linux - 将 Docker 镜像从 Azure 容器注册表部署到 Web 应用程序容器 "failed to register layer: Error processing tar file(exit status 1)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62569958/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com