I am using Azure Container Registry to store my private docker image and Azure Container Instance to deploy it.
I get a public IP address which is OK for verification and simple preview, but not usable (or shareable with customer) since the IP address is dynamic.
Is there a way to set up fully qualified domain name that i can use instead of changing IP address on every container restart?
Browsing through the documentation does not reveal anything about that.
To work around this, as Jason states we will be supporting FQDNs this month via the API. Looks like you can do it via Azure CLI using the dns-name-label flag: This will result in the following FQDN: aci-demo.westeurope.azurecontainer.io (westeurope being your location)
The FQDN like customlabel.azureregion.azurecontainer.io. is provided by Azure DNS service. Unfortunately, there is no way to directly set the custom domain for ACI, but you could create a CNAME record in your DNS provider to redirect your subdomain like www.example.com to this FQDN.
If you don't have an Azure subscription, create a free account before you begin. Select the Create a resource > Containers > Container Instances. On the Basics page, enter the following values in the Resource group, Container name, and Container image text boxes.
On the Networking page, specify a DNS name label for your container. The name must be unique within the Azure region where you create the container instance. Your container will be publicly reachable at <dns-name-label>.<region>.azurecontainer.io.
You can now set a dns-name-label as a property for your container group. Details are shared in this answer - hope this helps and thanks for being a user!
Azure Container Group IP Address disappeared
Is there a way to set up fully qualified domain name that i can use instead of changing IP address on every container restart?
Unfortunately, for now, Azure does not support to set a static public IP address for instance, Azure Container Instance still in preview.
In the future, we will expand our networking capabilities to include integration with virtual networks, load balancers, and other core parts of the Azure networking infrastructure.
More information about Azure Container Instance network, please refer to this link.
As a workaround, we can deploy a VM and run docker on it, set static public IP address for this VM, then restart docker we will not lose this public IP address.
Looks like you can do it via Azure CLI using the dns-name-label
flag:
az container create --resource-group myResourceGroup --name mycontainer --image mcr.microsoft.com/azuredocs/aci-helloworld --dns-name-label aci-demo --ports 80
src here
This will result in the following FQDN: aci-demo.westeurope.azurecontainer.io
(westeurope being your location)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With