Closed Anjali05 closed 5 years ago
When using user defined bridge, docker sets up a embedded DNS server bound to the loopback interface on address 127.0.0.10. runsc
network is isolated from the host and the loopback interface is contained inside the sandbox, therefore it cannot access the DNS server setup by Docker (on the host network). You can workaround it by using the --link
option to connect containers.
@fvoznika Is there any plan of enabling network communication between the containers running with runsc using netstack?
I think maybe we could add something to the docs to document the workaround.
--link
doesn't actually work with user defined bridge because Docker adds the alias to the embedded DNS instead of changing /etc/hosts
file like it does for the default bridge. So in terms of workarounds, there are a few options:
--link
to connect containers.--network=host
in runsc, however beware that it will use the host network stack and is less secure.@Anjali05 there are no plans currently to support Docker's embedded DNS as this breaks the sandbox isolation. Note that technically containers can communicate with each other, it's just the name lookup that doesn't work in Docker's user defined bridge.
@ianlewis, sure thing. I'll add it to the docs.
@fvoznika Thanks! I was using internal IP which is working.
I am trying to run a workload: https://github.com/parsa-epfl/cloudsuite/blob/master/docs/benchmarks/data-caching.md. It uses a user-defined bridge network, although the container runs fine with runc, it fails with runsc giving a DNS error on the client-side. All the other workloads in this suite is also failing on runsc as most of them have user defined bridge. I tried running normal Ubuntu container with user-defined network and then ran apt update but it's not able to connect to the archive site. I am wondering if there is any other network setting I need to define in runsc if I am using user-defined bridge network, the goal is to make two containers communicate with each other on the same host. I am using
--net
flag with docker run to specify the bridge.