I created a Container Instance in Azure and used a Hello World image. However, I do not get any IP to access the webserver!
-
Is the container running a web service? – smac89 Oct 06 '21 at 16:00
-
I guess so. I used a Quickstart image: mcr.microsoft.com/azuredocs/aci-helloworld:latest (Linux) – Umut cuscus Oct 06 '21 at 16:02
-
Did you follow the tutorial [here](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart)? – smac89 Oct 06 '21 at 16:04
-
Yes, I just did the exact same thing. No IP still... – Umut cuscus Oct 06 '21 at 16:09
-
So the part that says you should run `az container show --resource-group myResourceGroup --name mycontainer --query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" --out table`, shows nothing? – smac89 Oct 06 '21 at 16:10
-
I did deploy it on the portal. – Umut cuscus Oct 06 '21 at 16:12
-
I'm having the same issue. I'm following this tutorial https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart-portal – aGuyInLasVegas Oct 07 '21 at 03:34
2 Answers
TL;DR. You might want to use the CLI (or other methods) to deploy ACI.
Be sure to set either --ip_address public
or --dns-name-label <blah>
in order to create public IP address.
Example:
az container create --resource-group myResourceGroup --name mycontainer --image mcr.microsoft.com/azuredocs/aci-helloworld --dns-name-label aci-demo --ports 80
Ref: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart
Investigation details: I was able to reproduce the same issue when deploying ACI via the Azure portal. My guess is: there is a bug with the Azure portal , it is not sending the public IP / DNS label to Azure control plane so the public IP address was not created.
In this screenshot, I've also provided the DNS name label and set IP address to public, we can check the ARM template portal uses.
The ARM template looks like the following, where you can see dnsNameLabel
was defined as a parameter, but not being referenced / applied in the resource creation section
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"containerName": {
"type": "string"
},
"imageType": {
"type": "string",
"allowedValues": [
"Public",
"Private"
]
},
"imageName": {
"type": "string"
},
"osType": {
"type": "string",
"allowedValues": [
"Linux",
"Windows"
]
},
"numberCpuCores": {
"type": "string"
},
"memory": {
"type": "string"
},
"restartPolicy": {
"type": "string",
"allowedValues": [
"OnFailure",
"Always",
"Never"
]
},
"ports": {
"type": "array"
},
"dnsNameLabel": {
"type": "string"
}
},
"resources": [
{
"location": "[parameters('location')]",
"name": "[parameters('containerName')]",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2021-07-01",
"properties": {
"containers": [
{
"name": "[parameters('containerName')]",
"properties": {
"image": "[parameters('imageName')]",
"resources": {
"requests": {
"cpu": "[int(parameters('numberCpuCores'))]",
"memoryInGB": "[float(parameters('memory'))]"
}
},
"ports": "[parameters('ports')]"
}
}
],
"restartPolicy": "[parameters('restartPolicy')]",
"osType": "[parameters('osType')]"
},
"tags": {}
}
]
}

- 21
- 2
I have tested in my environment.
I followed this document Quickstart - Deploy Docker container to container instance - Portal - Azure Container Instances | Microsoft Docs to create a container instance via azure portal.
But the issue with creating the container from portal is IP address and FQDN are blank after creating the container instance. There might be some issue with creation of container instance via portal
I created another container instance using CLI by following this document Quickstart - Deploy Docker container to container instance - Azure CLI - Azure Container Instances | Microsoft Docs
The container instance is successfully created with IP address and FQDN.
So, we can create container instance with CLI for workaround.

- 2,837
- 2
- 5
- 11