question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The image 'x' in container group 'y' is not accessible. Please check the image and registry credential.

See original GitHub issue
  • azure-mgmt-containerinstance
  • 7.0.0
  • Windows
  • Python 3.8.7

Describe the bug Received message ‘Please check the image and registry credential.’ when attempting to create a container instance using an image in an Azure Container Registry.

To Reproduce Steps to reproduce the behavior:


    # Create aci_client using default credentials loaded from Environment Variables
    credential = DefaultAzureCredential(
        exclude_cli_credential=True,
        exclude_visual_studio_code_credential=True,
        exclude_shared_token_cache_credential=True,
        exclude_interactive_browser_credential=True,
     )

    aci_client = ContainerInstanceManagementClient(credential, subscription_id)


    # Create Container and pass in Environment Variables
    container_resource_requests = ResourceRequests(memory_in_gb=1.5, cpu=1.0)
    container_resource_requirements = ResourceRequirements(
        requests=container_resource_requests)
    container = Container(name=container_name,
                          image=container_image_name,
                          resources=container_resource_requirements,
                          command=start_command_line.split(),
                          environment_variables=[env_var_1, env_var_2])

    # Configure the container group
    group = ContainerGroup(location=resource_group.location,
                           containers=[container],
                           os_type=OperatingSystemTypes.linux,
                           restart_policy=ContainerGroupRestartPolicy.never)

    # Create the container group
    result = aci_client.container_groups.begin_create_or_update(resource_group.name,
                                                          container_group_name,
                                                          group)

    # Error azure.core.exceptions.HttpResponseError: (InaccessibleImage) The image 'x' in container group 'y' is not accessible. Please check the image and registry credential.

Expected behavior The container instance should load the image from the Registry

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
briglxcommented, May 7, 2021

Hi Kerwin,

This code does not use a private Container registry. My use case fails when it tries to access an image in a private repo. Can you please show the code where you can pass credentials to the private repo?

On Fri, May 7, 2021 at 1:22 AM Kerwin(Kaihui) Sun @.***> wrote:

Hi @briglx https://github.com/briglx , we have a code sample for this operation: MicrosoftDocs/azure-docs#38439 https://github.com/MicrosoftDocs/azure-docs/issues/38439. I don’t think that it’s a bug for SDK. Link a similar issue: MicrosoftDocs/azure-docs#38439 https://github.com/MicrosoftDocs/azure-docs/issues/38439

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-sdk-for-python/issues/16731#issuecomment-834165554, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6RRUZCYMVXRLZYSXD7XTTMOPLHANCNFSM4XROE6TQ .

0reactions
omonimus1commented, Jul 5, 2022

Having the same issue here; Cannot access docker hub from private repository.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploying docker container instance fails to access private ...
Everytime I attempt to deploy the instance I get "BadRequest" error message, and the details below say that the image is not accessible....
Read more >
Using Azure Container Registry creating new ... - Stack Overflow
Azure.CloudException: 'The image 'mytestimage/latest' in container group 'mytestgroup' is not accessible. Please check the image and registry ...
Read more >
Deploying Docker containers on Azure
The Docker CLI will fetch your registry login for the deployed images and send the credentials along with the image deployment information to...
Read more >
How to create a Container Instance in Azure from a ... - Reddit
The image 'monkeyz/myimage' in container group 'knight-test' is not accessible. Please check the image and registry credential.
Read more >
8. Container and Instance Groups - Ansible Documentation
If a Container Registry credential is associated with the execution environment, then the controller will attempt to make a ImagePullSecret to pull the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found