I created a Container Instance in Azure and used a Hello World image. However, I do not get any IP to access the webserver!
Azure Container instances no IP
1.7k Views Asked by Umut cuscus AtThere are 2 best solutions below

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.
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:
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