gh-net icon indicating copy to clipboard operation
gh-net copied to clipboard

[docker-in-docker]: enable DNS resolution

Open legomushroom opened this issue 3 years ago • 0 comments

Currently, for docker-in-docker setups, DNS resolution will fail since some clients will try to resolve DNS hostname within a nested container which unaware of Codespace nameservers or (stub) resolvers.

We need to enable such scenarios by either providing an automatic solution or providing clear instructions to follow.

Known workarounds

  • add explicit IP address to hostnamemapping in/etc/hostsof the nested container, (e.g.192.168.86.5 my-hostname.github.dev`)

Repro steps

  1. Create a Codespace with a docker-compose setup that spawns multiple services inside a Codespace.
  2. Use the gh net extension to create network bridge and share remote resources with a Codespace.
  3. Make one of the server to query a remote resource(e.g. make an HTTP request), notice that DNS resolution fails and hence a request.

cc @chrisbloom7

legomushroom avatar Apr 25 '22 21:04 legomushroom