How to configure custom DNS in a Loome Container Instance

What Happened?

The Loome agent requires a custom DNS to be able to communicate with databases.

Issue:

Azure Container instances are designed to be self-contained images and do not allow changes to be made to the OS at runtime.

How can you fix it?

Resolution

You will need to update your container. You can do this by importing a YAML file to configure a custom DNS.

Follow these steps:

Navigate to the Agents page found in the top-right menu.

dns1

Click on Setup Agent at the top-right of the page.

dns2

Click on Azure Container Instances from the tabs on the left.

dns3

Fill out the required fields.

Deploy the agent via Azure CLI.

dns4

Rather than crafting a YAML file from scratch, you can use the az container export command to get a YAML file with all the settings of your existing container.


az container export -g YOURRESOURCEGROUP --name YOURCONTAINERNAME -f output.yaml

Open the YAML file via VSCode and add the custom DNS.

Please note that YAML is TAB sensitive.


    dnsConfig:
        nameServers:
        - 10.0.0.10 # DNS Server 1
        - 10.0.0.11 # DNS Server 2
    searchDomains: contoso.com # DNS search suffix

After saving the changes, run an import command to update your container using the az container create command with the –file switch.


az container create -g YOURRESOURCEGROUP --f output.yaml

Learn More:

Additional information can be found at the following links.