How to get set up FQDN for Azure Container Instance

Viewed 10489

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.

4 Answers

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)

When using a docker-compose.yml file on ACI(Azure Container Instances), domainname property is used for FQDN.

services:
    service-name:
        image: ****
        domainname: **FQDN**
Related