Open lonevvolf opened 2 years ago
Hi @lonevvolf, I transferred this issue to docker/compose-cli
since that's where the cloud integration lives
I've done a bit more experimentation on this and found: 1) The commands run fine on a fresh Docker Desktop installation without logging in to Docker Desktop 2) Once you log in to Docker Desktop and try the command again, you get the message: containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="MoreImageRegistryCredentialsThanContainers" Message="More image registry credentials provided than containers in container group 'sweet-austin'." 3) If I now logout, either through command line or GUI and try to create the container, I get: containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InaccessibleImage" Message="The image 'nginx' in container group 'exciting-curran' is not accessible. Please check the image and registry credential."
As of yet, I am unable to get it working again.
Same here! However, it is working in the default context, i.e.:
docker --context default run -p 80:80 nginx
OR
docker context use default
then docker compose up
It is also working being in my context if I only use images hosted on azurecr.io
Reproduced again with v4.8.2. Still can't deploy to ACI.
So it appears that MS has decided that the Docker Hub repo is not in some default search hierarchy. The example page should be changed to specify the site where the image is hosted. ie.
docker --context myacicontext run -p 80:80 registry.hub.docker.com/library/nginx
Using this, the command succeeds.
Thank you @lonevvolf for sharing the outcome of your troubleshooting. From @pemmenegger's comment, it seems the docker aci integration defaults to azurecr.io as the container registry for lookup.
From documentation of Docker Azure Integration:
You can deploy private images to ACI that are hosted by any container registry. You need to log into the relevant registry using docker login before running docker run or docker compose up. The Docker CLI will fetch your registry login for the deployed images and send the credentials along with the image deployment information to ACI. In the case of the Azure Container Registry, the command line will try to automatically log you into ACR from your Azure login.
@syedsuhaib Thank you for following up. Unfortunately, exactly the instructions you provided (docker lockin) produce the errors listed above. Only specifying the repo in the command line fixes the issue. Therefore, the example page referenced (https://docs.docker.com/cloud/aci-integration/#run-docker-containers-on-aci) should be updated or no one will be able to successfully execute the steps.
I have created a PR to update the documentation as suggested by you. Waiting for it to be reviewed before it can be merged into Docker Docs.
@lonevvolf thank you for your comment. It saved my day cause I have the same problem. Docker must update their documentation (https://docs.docker.com/cloud/aci-integration/).
So it appears that MS has decided that the Docker Hub repo is not in some default search hierarchy. The example page should be changed to specify the site where the image is hosted. ie.
docker --context myacicontext run -p 80:80 registry.hub.docker.com/library/nginx
Using this, the command succeeds.
That worked for me, but now I'm getting a different error message:
containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InaccessibleImage" Message="The image 'registry.hub.docker.com/josecelano/torrust-tracker:v0.1.0' in container group 'stoic-lehmann' is not accessible. Please check the image and registry credential."
registry.hub.docker.com
I've removed the context and created a new one, which now works.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I run into the same issue, following the example https://docs.docker.com/cloud/aci-integration/. This comment solves it for me https://github.com/docker/compose-cli/issues/2150#issuecomment-1132698124
This issue has been automatically marked as not stale anymore due to the recent activity.
@syedsuhaib It looks like your PR was not merged due to some technicality. Can you please check that?
Running through the example/instructions here: https://docs.docker.com/cloud/aci-integration/#run-docker-containers-on-aci
I always get the error message: containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="MoreImageRegistryCredentialsThanContainers" Message="More image registry credentials provided than containers in container group 'quirky-agnesi'."
when trying to run the container as in the example: docker --context myacicontext run -p 80:80 nginx
Steps to reproduce the issue:
Describe the results you received: containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="MoreImageRegistryCredentialsThanContainers" Message="More image registry credentials provided than containers in container group 'quirky-agnesi'."
Describe the results you expected: Container should be created/started.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):