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:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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:
Having the same issue here; Cannot access docker hub from private repository.