According to this, others have noticed that "traceroute doesn't work on Linux Containers running on Docker for Windows". If it's indeed an issue with ICMP (traceroute uses UDP as a default protocol), you should be able to force traceroute to use ICMP and/or "ICMP ECHO as a probe" by following traceroute's doc.
Here 192.168.1.254 is the IP of the gateway of a Windows machine running Docker for Windows and 10.0.0.1 is the gateway of a Docker custom network:
root@a6b6fc6aa0f5:/usr/local/apache2# traceroute 192.168.1.254
traceroute to 192.168.1.254 (192.168.1.254), 64 hops max
1 10.0.0.1 0.004ms 0.002ms 0.002ms
2 * * *
3 * * *
One should use:
root@a6b6fc6aa0f5:/usr/local/apache2# traceroute --icmp 192.168.1.254
traceroute to 192.168.1.254 (192.168.1.254), 64 hops max
1 10.0.0.1 0.005ms 0.002ms 0.002ms
2 192.168.1.254 1.217ms 0.984ms 0.853ms
or:
root@a6b6fc6aa0f5:/usr/local/apache2# traceroute --type=icmp 192.168.1.254
traceroute to 192.168.1.254 (192.168.1.254), 64 hops max
1 10.0.0.1 0.003ms 0.002ms 0.001ms
2 192.168.1.254 1.410ms 1.005ms 1.507ms
With www.google.com as a target traceroute still have an issue on my machine but eventually reaches something. Not exactly a "route" though... Maybe it's now about WinNAT, TTL, TCP forwarding or some Docker inside parameters.
root@f5d952a9119f:/usr/local/apache2# traceroute --icmp www.google.com
traceroute to www.google.com (142.250.74.228), 64 hops max
1 10.0.0.1 0.019ms 0.002ms 0.002ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 142.250.74.228 8.304ms 7.595ms 7.027ms
Version : traceroute (GNU inetutils) 2.0