Search code examples
azuredockerdocker-desktop

Docker: "Deploying Docker containers on Azure" directions


I'm trying to follow these directions to use docker on Azure:

Here is what I did:

  1. Ensured Docker Desktop is downloaded. It is and it is running
  2. Created Azure account & log in via CLI (finished logging in via browser.)
  3. Created ACI context & confirmed it exists.
  4. Ran a working, existing container using docker --context mycontext run -p 8080:8080 <container-name>

Step 4 returns...

containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=403 -- Original Error: Code="AuthorizationFailed" Message="The client 'client@domain.edu' with object id 'id' does not have authorization to perform action 'Microsoft.ContainerInstance/containerGroups/write' over scope '/subscriptions/subscriptionNumber/resourceGroups/TLT-WVD-Pilot/providers/Microsoft.ContainerInstance/containerGroups/<group-name-here>' or the scope is invalid. If access was recently granted, please refresh your credentials."

How do I debug this or even "refresh credentials"? Repeating the login process via CLI (finishing with browser) does not change anything.


Solution

  • According to the error message, it seems your Azure account does not have enough permission to create the ACI in the resource group. So you need to check if your Azure account has enough permission for the resource group. Perhaps the built-in role Contributor for the resource group is suitable and safe for you.