简体   繁体   中英

Azure Release failing for Linux Container Azure App Service Deployment

I am deploying containers from Azure Container Registry using Azure Release and the Azure App Service Deploy task. I have a Subscription Level Service connection defined. Container Registry Settings are set as:

Registry or Namespace: <registry>.azurecr.io
Image: rrez/vnext/dev/booking
Tag: latest
Startup command: "dotnet", "Booking.API.dll"

The task completes successfully, but when reviewing in Container Log on the App Service I see:

2019_02_25_RD00155D9B2488_docker.log:
2019-02-25 22:27:07.101 INFO  - Issuing docker pull: imagename =<registry>.azurecr.io/rrez/vnext/dev/booking:latest
2019-02-25 22:27:07.260 INFO  - Issuing docker pull: imagename =<registry>.azurecr.io/rrez/vnext/dev/booking:latest
2019-02-25 22:27:07.410 INFO  - Issuing docker pull <registry>.azurecr.io/rrez/vnext/dev/booking:latest
2019-02-25 22:27:07.487 ERROR - docker pull returned STDERR>> Error response from daemon: Get https://<registry>.azurecr.io/v2/rrez/vnext/dev/booking/manifests/latest: unauthorized: authentication required

This seems to be an ACR access issue, but I would expect the Subscription Level Service Connection to be authority enough.

Since this is Azure Release there is no YAML configuration available to add additional authentication details.

I pasted the YAML from the Release Task into the successfully completing Build and received the same error.

The YAML is:

- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy: P-RREZ-BOOKING-PREPROD'
  inputs:
    ConnectionType: AzureRM
    azureSubscription: 'RightRez.Services SubscriptionSC'
    appType: webAppContainer
    WebAppName: 'P-RREZ-BOOKING-PREPROD'
    deployToSlotOrASE: true
    ResourceGroupName: '<ResourceGroup>-RG'
    DockerNamespace: <registry>.azurecr.io
    DockerRepository: rrez/vnext/dev/booking
    DockerImageTag: latest
    StartupCommand: '"dotnet", "Booking.API.dll"'

Not sure where the problem lies.

Have you set the Access level in the ACR? If not please try setting up one from here . I had similar issue and I tried setting up the role assignment and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM