How can I get VSCode to use host networking during the build of the container? In devcontainer.json, I can set
"runArgs": ["--network=host"]
but that only applies to running the container. How can I get VSCode to use host networking during the build of the container?
UPDATE 2023
The solution below no longer works. According to a GitHub issue you can use this instead:
Original Solution (no longer works)
You need to add the following in your devcontainer.json file:
This property will allow you to use the host network when building.