Hello, @halpert3 !
Why am I running into a "MoreImageRegistryCredentialsThanContainers" error on Azure Container Instances (ACI)?
If you run the following on ACI, you'll get an error:
Command
docker --context myacicontext run -p 80:80 nginx
Resulting error
containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="MoreImageRegistryCredentialsThanContainers" Message="More image registry credentials provided than containers in container group 'mycontainergroup'."
This has been reported by lonevvolf in GitHub issue 2150 and is caused by the Docker Hub repo not residing in the default search location (Azure Container Registry). Using the full URI where the image is hosted will resolve this issue:
docker --context myacicontext run -p 80:80 registry.hub.docker.com/library/nginx
References and additional reading:
- Docker Compose CLI: Error running against ACI #2150
- Docker GitHub.io: add instructions for deploying DockerHub images #14932
- Docker blog: How To Deploy Containers to Azure ACI using Docker CLI and Compose
- Docker docs: Deploying Docker containers on Azure
- Microsoft Learn: Quickstart: Deploy a container instance in Azure using the Docker CLI