Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get set up FQDN for Azure Container Instance

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.

like image 867
ljubomir Avatar asked Sep 26 '17 15:09

ljubomir


People also ask

How to get FQDN from Azure CLI via API?

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)

How to set custom domain for ACI in Azure Container?

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.

How do I create a container instance in azure?

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.

How do I create a DNS label for an Azure Container?

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.


3 Answers

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

like image 73
jluk Avatar answered Oct 15 '22 06:10

jluk


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.

like image 24
Jason Ye Avatar answered Oct 15 '22 04:10

Jason Ye


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)

like image 41
Duck Ling Avatar answered Oct 15 '22 04:10

Duck Ling