This repository was archived by the owner on Oct 20, 2023. It is now read-only.
This repository was archived by the owner on Oct 20, 2023. It is now read-only.
[docker-in-docker]: enable DNS resolution #5
Open
Description
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 tomapping in
/etc/hostsof the nested container, (e.g.
192.168.86.5 my-hostname.github.dev`)
Repro steps
- Create a Codespace with a
docker-compose
setup that spawns multiple services inside a Codespace. - Use the
gh net
extension to create network bridge and share remote resources with a Codespace. - 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