Docker Container can't use traceroute, but why?

SCALE

Thumbnail image: It’s time for more precise trading.

I already saw that issue and yes, the Container is running with root. I somehow got it to work once. I added a second interface which directly connects to my router and then it worked for a while. After a reboot of the container it stopped working. I have now both interfaces running, but It seems that everything runs through eth0 but I want it to use net1.

Comment Image

More replies

Most likely there's a security setting in the image that is preventing it from running. traceroute is a little bit of a screwy app in the Unix space because it has to run setuid, and that's not always something allowed. If it works depends on the container's configuration and the base OS image it is using.

That said, it also won't work from containers using port forwarding (ie, not ipvlan or macvlan), but I don't think it would report an error, it just wouldn't ever get response packets. So I doubt that's it.