Hyp*_*rew 7 linux azure docker azure-devops azure-pipelines-release-pipeline
我正在尝试web app for containers (Linux)通过Azure Devops. 我正在使用该任务Azure Web App for Containers来完成此任务。
在 Azure 中构建映像并将其推送到我的私有容器注册表工作正常。但是,当我尝试部署新构建和推送的映像时,出现身份验证错误。
Azure Devops 报告部署进行得很顺利,但是当我查看container settingsAzure选项卡中的 docker 日志时,我看到一个身份验证错误。如果我尝试直接在其中部署我的图像,container settings它会按预期工作。
以前,我拥有与 Azure 订阅的服务连接,并且还为 Azure 容器注册表添加了单独的服务连接。我没有使用 docker compose,而是尝试部署单个图像/容器。
Azure DevOps 日志:
2019-08-12T13:48:47.3512681Z ##[section]Starting: Azure Web App on Container Deploy: my-service
2019-08-12T13:48:47.3676562Z ==============================================================================
2019-08-12T13:48:47.3676709Z Task : Azure Web App for Containers
2019-08-12T13:48:47.3676775Z Description : Deploy containers to Azure App Service
2019-08-12T13:48:47.3676828Z Version : 1.0.22
2019-08-12T13:48:47.3676870Z Author : Microsoft Corporation
2019-08-12T13:48:47.3676932Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-containers
2019-08-12T13:48:47.3677003Z ==============================================================================
2019-08-12T13:48:47.6472308Z Got service connection details for Azure App Service:'my-service'
2019-08-12T13:48:48.7565776Z Single-container Deployment to the webapp 'my-service' as only the image detail was sepcified.
2019-08-12T13:48:49.2180101Z Updating App Service Configuration settings. Data: {"appCommandLine":null,"linuxFxVersion":"DOCKER|my-registry.azurecr.io/my-repository:latest"}
2019-08-12T13:48:51.1744261Z Updated App Service Configuration settings.
2019-08-12T13:48:51.1752210Z Restarting App Service: my-service
2019-08-12T13:48:51.6881923Z App Service 'my-service' restarted successfully.
2019-08-12T13:48:54.9987139Z Successfully updated deployment History at https://my-service.scm.azurewebsites.net/api/deployments/12431565617733135
2019-08-12T13:48:55.5252693Z App Service Application URL: https://my-service.azurewebsites.net
2019-08-12T13:48:55.5391444Z ##[section]Finishing: Azure Web App on Container Deploy: my-service
Run Code Online (Sandbox Code Playgroud)
Docker 登录 Azure:
2019-08-12 07:54:11.184 INFO - Pulling image: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:11.424 ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"manifest for my-registry.azurecr.io/my-service:20190812.8 not found: manifest unknown: manifest unknown"}
2019-08-12 07:54:11.425 ERROR - Pulling docker image my-registry.azurecr.io/my-service:20190812.8 failed:
2019-08-12 07:54:11.426 INFO - Pulling image from Docker hub: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:11.461 ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://my-registry.azurecr.io/v2/my-service:/manifests/20190812.8: unauthorized: authentication required"}
2019-08-12 07:54:11.463 ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
2019-08-12 07:54:13.482 INFO - Pulling image: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:13.588 ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"manifest for my-registry.azurecr.io/my-service:20190812.8 not found: manifest unknown: manifest unknown"}
2019-08-12 07:54:13.593 ERROR - Pulling docker image my-registry.azurecr.io/my-service:20190812.8 failed:
2019-08-12 07:54:13.593 INFO - Pulling image from Docker hub: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:13.628 ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://my-registry.azurecr.io/v2/my-service:/manifests/20190812.8: unauthorized: authentication required"}
2019-08-12 07:54:13.629 ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
2019-08-12 07:54:17.116 INFO - Pulling image: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:17.244 ERROR - DockerApiException: Docker API responded with status code=NotFound, response={"message":"manifest for my-registry.azurecr.io/my-service:20190812.8 not found: manifest unknown: manifest unknown"}
2019-08-12 07:54:17.245 ERROR - Pulling docker image my-registry.azurecr.io/my-service:20190812.8 failed:
2019-08-12 07:54:17.246 INFO - Pulling image from Docker hub: my-registry.azurecr.io/my-service:20190812.8
2019-08-12 07:54:17.281 ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://my-registry.azurecr.io/v2/my-service:/manifests/20190812.8: unauthorized: authentication required"}
2019-08-12 07:54:17.283 ERROR - Image pull failed: Verify docker image configuration and credentials (if using private repository)
Run Code Online (Sandbox Code Playgroud)
任何人都遇到过同样的问题?即使我在 Azure Devops 中添加了服务连接,我是否明确需要向注册表提供凭据?
作为最后的手段,我通过删除与 Azure Devops 中的订阅的服务连接并将其添加回来,使其神奇地发挥作用。(无需为 Azure 容器注册表建立单独的服务连接)
非常令人沮丧!
| 归档时间: |
|
| 查看次数: |
1709 次 |
| 最近记录: |