Accessing remote container by name


I have a docker host which has 3 containers:

  • Container-A
  • Container-B
  • TwinGate Connector

all 3 of them are connected to the same docker network.

Container-A is able to access (e.g. Ping) Container-B by its name (rather than IP address), and vice versa.

I added a resource in my TwinGate account called “Container-A”, however I’m unable to access it by it’s name, but only via IP.

How can I solve that?

Hi Jerry,

Can you send me a private message with your Twingate Tenant Slug (the [whatever] part of [whatever] so I can look at how you have things configured?

As a few suggestions:

If you just have “Container-A” defined as a DNS resource inside of Twingate, you will need to do a little bit of extra work to support unqualified domain names - Our documentation on this is here: Supporting Unqualified Domain Names

Alternatively, you could specify entries in your local system hosts file that point to the IP(s) of container a and b that resolve to the unqualified domains, that would accomplish the same thing, it just isn’t dynamic.

But let me know your slug and I can review your configuration, or feel free to ask additional questions!



Thank you Arthur. Done :slight_smile:

Hey Jerry,

So looking at your configuration - I see the one FQDN entry for jerry-devserver-1 - but no corresponding entry for the FQDN. (even it if was or what have you)

As we lay out in the help article I mentioned in my previous post - you will need to have both defined as well as have your search domains set on the connector in order to properly leverage it.

Give that a try and let me know how it goes!



Thank you, Arthur!

So I’m running my environment in Docker running inside a Windows host.

Could I reached my desired state by adding another DNS docker container and point TwinGate’s container DNS to the IP of the DNS container? (using --dns argument)