I am following the guide from Microsoft for deploying a container with sidecar for HTTPS access here. However, I am trying to use one of my images, which I already pushed to ACR. I followed all the steps until
az container create --resource-group <myResourceGroup> --file deploy-aci.yaml
The contents of my deploy-aci.yaml file are these:
api-version: 2019-05-01
location: switzerlandnorth
name: app-with-ssl
properties:
containers:
- name: nginx-with-ssl
properties:
image: mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine
ports:
- port: 443
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx
- name: my-container
properties:
image: my-registry/my-image:latest
ports:
- port: 80
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumes:
- secret:
ssl.crt: base64-encoded-cert
ssl.key: base64-encoded-key
nginx.conf: base64-encoded-conf-content
name: nginx-config
ipAddress:
ports:
- port: 443
protocol: TCP
type: Public
osType: Linux
tags: null
type: Microsoft.ContainerInstance/containerGroups
When trying to run the container create command above, I am getting this error:
(InaccessibleImage) The image
‘my-registry/my-image:latest’
in container group ‘app-with-ssl’ is not accessible. Please check the
image and registry credential. Code: InaccessibleImage Message: The
image
‘my-registry/my-image:latest’
in container group ‘app-with-ssl’ is not accessible. Please check the
image and registry credential.
I tried running the above command and also giving it the credentials to my registry, like this:
az container create --resource-group my-resource-group --file deploy-aci.yaml --registry-login-server my-server.azurecr.io --registry-username my-registry --registry-password my-password
I also tried pulling the image on my local computer, which I could with no problem. The image is publicly available (Basic pricing plan, I can’t set it to private) and I checked my credentials to be correct. Any idea on where else I am missing something?
2
Answers
I believe it needs the full URL for the image. So, in
deploy-aci.yaml
replace this linewith something like
Is it your own azure container registry, is it right?
Have you tried logging in like this?: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli
I have also encountered this error – not so long ago – and it was fixed after direct login.
Have you tried to create the container with less settings/properties?
Have you tried create only one container?
Are you sure that there is no error in the part after "volume"?