0
votes

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.

1
After realizing the Container logs are not updating, I also tried turning CD on to allow ACR to auto-deploy the container. No change. The container logs are not recording any activity. There are two Apps and both behave the same way.EHuggins

1 Answers

0
votes

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.