10

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.

ljubomir
  • 1,495
  • 1
  • 21
  • 40

4 Answers4

8

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

jluk
  • 1,000
  • 7
  • 12
4

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

services:
    service-name:
        image: ****
        domainname: **FQDN**
niek tuytel
  • 899
  • 7
  • 18
  • Awesome, although the ip wont remain the same on each restart, the FQDN name will, so you dont really have to change anything on restart – Eden Nov 23 '22 at 12:03
3

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.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • If you restart your container instance you are not guaranteed the same public IP. To work around this, as Jason states we will be supporting FQDNs this month via the API. – jluk Feb 02 '18 at 00:15
1

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)

Duck Ling
  • 1,577
  • 13
  • 20