Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Error running against ACI #2150

Open
lonevvolf opened this issue May 16, 2022 · 15 comments
Open

Error running against ACI #2150

lonevvolf opened this issue May 16, 2022 · 15 comments

Comments

@lonevvolf
Copy link

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:

  1. Follow the tutorial at: https://docs.docker.com/cloud/aci-integration/

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:

Client:
 Cloud integration: v1.0.24
 Version:           20.10.14
 API version:       1.41
 Go version:        go1.16.15
 Git commit:        a224086
 Built:             Thu Mar 24 01:53:11 2022
 OS/Arch:           windows/amd64
 Context:           myacicontext
 Experimental:      true

Server: Docker Desktop 4.8.1 (78998)
 Engine:
  Version:          20.10.14
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.15
  Git commit:       87a90dc
  Built:            Thu Mar 24 01:46:14 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.11
  GitCommit:        3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc:
  Version:          1.0.3
  GitCommit:        v1.0.3-0-gf46b6ba
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.8.2)
  compose: Docker Compose (Docker Inc., v2.5.0)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 2
 Server Version: 20.10.14
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc version: v1.0.3-0-gf46b6ba
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.102.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 31.16GiB
 Name: docker-desktop
 ID: SJWN:4LAT:NVQS:O4DU:VROV:RAZ4:YDOL:TK7U:QQ2Y:FQFL:LL3Z:DAQ5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Additional environment details (AWS, VirtualBox, physical, etc.):

@rumpl rumpl transferred this issue from docker/cli May 17, 2022
@rumpl
Copy link
Contributor

rumpl commented May 17, 2022

Hi @lonevvolf, I transferred this issue to docker/compose-cli since that's where the cloud integration lives

@lonevvolf
Copy link
Author

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.

@pemmenegger
Copy link

pemmenegger commented May 17, 2022

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

@lonevvolf
Copy link
Author

Reproduced again with v4.8.2. Still can't deploy to ACI.

@lonevvolf
Copy link
Author

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.

@syedsuhaib
Copy link

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.

@lonevvolf
Copy link
Author

@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.

@syedsuhaib
Copy link

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.

@samibrahmi
Copy link

@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/).

@josecelano
Copy link

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."

@josecelano
Copy link

registry.hub.docker.com

I've removed the context and created a new one, which now works.

@stale
Copy link

stale bot commented Jun 18, 2023

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.

@stale stale bot added the stale Inactive issue label Jun 18, 2023
@Hardy74
Copy link

Hardy74 commented Aug 31, 2023

I run into the same issue, following the example https://docs.docker.com/cloud/aci-integration/. This comment solves it for me #2150 (comment)

@stale
Copy link

stale bot commented Aug 31, 2023

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale stale bot removed the stale Inactive issue label Aug 31, 2023
@ryan-adler
Copy link

@syedsuhaib It looks like your PR was not merged due to some technicality. Can you please check that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants