我有一个带有Docker容器的Web应用程序。我添加Azure容器注册表并添加到应用程序。我还启用了管理员用户在容器中。然后我使用以下命令:
docker build -t clothinginsecuritydocker.azurecr.io/prod:latest
docker login clothinginsecuritydocker.azurecr.io
docker push clothinginsecuritydocker.azurecr.io/prod:latest
之后,我连接Github的行动和部署是成功的。但在那之后,我总是得到错误:
2023-10-09T16:17:45.672Z ERROR - failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host IDErr: 0, Message: failed to register layer: Error processing tar file(exit status 1): Container ID 718322462 cannot be mapped to a host ID
2023-10-09T16:17:45.694Z INFO - Pull Image failed, Time taken: 0 Minutes and 47 Seconds
2023-10-09T16:17:45.695Z ERROR - Pulling docker image clothinginsecuritydocker.azurecr.io/clothinginsecuritydocker/prod:ba2cad09552128b3aabfc6a7d526c71dd4adc7d4 failed:
2023-10-09T16:17:45.988Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Head \"https://clothinginsecuritydocker.azurecr.io/v2/clothinginsecuritydocker/prod/manifests/ba2cad09552128b3aabfc6a7d526c71dd4adc7d4\": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."}
2023-10-09T16:17:45.989Z WARN - Image pull failed. Defaulting to local copy if present.
2023-10-09T16:17:45.999Z ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
2023-10-09T16:17:46.009Z INFO - Stopping site clothinginsecurityserver because it failed during startup.
我试着不采取行动,但没有帮助。我也有配置中的所有值。我试着用azurecli登录,命令是:az acr login --name clothinginsecuritydocker.azurecr.io
1条答案
按热度按时间nzk0hqpo1#
Docker CLI and daemon
在您的环境中运行。Registry name
或您正在使用的credentials
应该是正确的。Selected Networks
访问,如特定的虚拟网络或IP地址。AcrPush
或AcrPull
角色。