user25518631
user25518631

Reputation: 35

(InaccessibleImage) The image From Azure container instance

I am using following commands: but it is failing with following image. how to fix this?

az container create --resource-group $(zapACIGroupName) --name $(zapACIName) 
    --image owasp/zap2docker-stable --ports 8080 8090 
    --azure-file-volume-account-name $(zapACIStoreName) 
    --azure-file-volume-account-key $(createSA.aciStoreKey) 
    --azure-file-volume-share-name $(zapACIShareName) 
    --azure-file-volume-mount-path /zap/wrk/ 
    --command-line "/bin/bash -c 'zap-baseline.py -t https://$(webAppNameDev).azurewebsites.net -x $(zapReportName)'"

But I am seeing following error:

ERROR: (InaccessibleImage) The image 'owasp/zap2docker-weekly:latest' in container group 'ausemart-zap01-aci' is not accessible. Please check the image and registry credential.

Code: InaccessibleImage

Message: The image 'owasp/zap2docker-weekly:latest' in container group 'ausemart-zap01-aci' is not accessible. Please check the image and registry credential.

I have tried to use different image version but same error. and I have tested locally same error

Upvotes: 1

Views: 289

Answers (1)

Vivek Vaibhav Shandilya
Vivek Vaibhav Shandilya

Reputation: 2646

To create Container Instance using image from Azure Container Registry or any private registry. you need to enable Admin user and pass the username and password value.

Without enabling the admin user i was also getting same error as we need to pass user name and password.

(InaccessibleImage) The image 'vivek.azurecr.io/caddy:latest' in container group 'container21aug' is not accessible. Please check the image and registry credential.

Code: InaccessibleImage

Message: The image 'vivek.azurecr.io/caddy:latest' in container group 'container21aug' is not accessible. Please check the image and registry credential.

I followed this steps:

  • I pushed Image ACR

Enable Admin user in Azure container registry

Below given command which worked for me.

I am using caddy image and enabled Ip address to check the caddy default page.

az container create --resource-group Vivek-RG --name container21aug --image vivek.azurecr.io/caddy:latest --registry-password xxxxxxxxxxxxxxxxx --ip-address Public

OUTPUT:

Upvotes: 0

Related Questions