Weave Net

Name resolution via `/etc/hosts`

When starting Weave Net enabled containers, the proxy automatically replaces the container’s /etc/hosts file, and disables Docker’s control over it. The new file contains an entry for the container’s hostname and Weave Net IP address, as well as additional entries that have been specified using the --add-host parameters.

This ensures that:

If you prefer to keep /etc/hosts under Docker’s control (for example, because you need the hostname to resolve to the Docker-assigned IP instead of the Weave IP, or you require name resolution for Docker-managed networks), the proxy must be launched using the --no-rewrite-hosts flag.

host1$ weave launch --no-rewrite-hosts

See Also