Azure / Azure/azure-cli-extensions

ContainerApps - Update error message and help to indicate need to use --registry-server argument

Open
#5,238 4 comments 0 reactions 0 assignees View on GitHub
Auto-Assign ContainerApp Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues)

### Related command

`containerapp create`

### Extension name (the extension in question)
containerapp

### Description of issue (in as much detail as possible)
I’m trying to deploy [Metabase](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.metabase.com%2Fdocs%2Flatest%2Foperations-guide%2Frunning-metabase-on-docker.html&data=05%7C01%7Ccharris%40microsoft.com%7Ca59fc872e4a84600225308da7cb592c4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637959416664904774%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OjptO4GY8AWiih7zRO6k%2FMiQuJIAKUqsNMTya8b0S6s%3D&reserved=0) to ACA.
I pulled the docker image to my machine, tagged it and then pushed it to my ACR.

**Unauthorized**
I ran into was getting authentication error when running `containerapp create`.

`az containerapp create -n metabase -g $RESOURCE_GROUP --environment $CONTAINERAPPS_ENVIRONMENT --image metabaseacr.azurecr.io/metabase:latest --target-port 3000 --ingress 'external'`

> The following field(s) are either invalid or missing. Invalid value: "metabaseacr.azurecr.io/metabase:latest": GET https:?scope=repository%3Ametabase%3Apull&service=metabaseacr.azurecr.io: UNAUTHORIZED: authentication required, visit [https://aka.ms/acr/authorization](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Facr%2Fauthorization&data=05%7C01%7Ccharris%40microsoft.com%7Ca59fc872e4a84600225308da7cb592c4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637959416664904774%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n2cPvB7v2sBQUgyGFMiuVJ%2B%2BsRAPuY8naqd%2FjVoqGjo%3D&reserved=0) for more information.: template.containers.metabase.image.

I confirmed that the ACR is admin-enabled:
![image](https://user-images.githubusercontent.com/74415662/184670511-5270bfc9-e183-4f3b-a185-db26862f1d34.png)

After talking to one of the ACA PMs, I learned that I needed to specify the `--registry-server` argument.
Both the help and the error message should be updated to make this clearer to the user.

-----

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.