Earlier quoted context omitted.
Why is this not supported during docker build? I'm not very familiar with the --privileged flag - isn't that only related to sharing on the host? Edits to /etc/hosts in a container don't affect the host, so it seems like everything should Just Work.
I think it is supported. The feature we are discussing allows the container to change its own resolv/host files, from the inside. I'm pretty sure that works from build also. But it's possible that I missed one of the patches (a sign of healthy autonomy and trust between maintainers).
(just tested it out as this was my assumption all along).