How to resolved container hostname from local host or other system

Expected behavior

need to resolve docker container id from localhost so we can use msdtc service of sql

Actual behavior

When pinging with container id it is not resovling.


  • the output of:
    -rohit@poweshell~ % ping 99745408996d
    ping: cannot resolve 99745408996d: Unknown host

Steps to reproduce the behavior

  1. … Download a IIS container
  2. … Run on the host network and copy the container id
    3… ping <container_id>

The Host network is not available in Windows, so that won’t be an option. You might be using NAT.

There’s a bunch of things here to unpack, but what I’m interested is why do you need to resolve the container id from the host? Are you using MSDTC inside the container? There are limitations in using MSDTC and you can check the official documentation from Microsoft here: Lift and shift to containers | Microsoft Learn