Open allsey87 opened 1 month ago
As a side note, this issue has emerged somewhat recently (in the past 2-3 months). Before that I had no problem using host networking.
I guess the port forwarding just keeps connecting to itself. The Dev Containers extension would need a way to tell VS Code that no port forwarding should be done to avoid this.
Workaround is to not forward any ports.
@chrmarti do you have an idea about why this only started a few months ago? We do have a way for the Dev Containers extension to VS Code that. Several options:
setContext
of forwardedPortsViewEnabled
. This will not work if there's another extension, like Dev Tunnels, which also supports port forwarding installed.PortAutoForwardAction.Ignore
:I think 2 is probably the best bet.
Sounds good. I'm not aware of changes that would explain the changed behavior.
When I create a devcontainer with host networking and try to connect to a forwarded port, I am getting an explosion of Docker processes that keeps increasing until all memory has been consumed. I think this might be the underlying issue behind https://github.com/microsoft/vscode-remote-release/issues/4079 and https://github.com/microsoft/vscode-docker/issues/2875 too.
Setup information
And my version of the devcontainers extension is
v0.369.0
.Minimum reproducible example
devcontainer.json:
Dockerfile:
1234
curl https://localhost:1234/
curl
or run out of memory and have to reboot.Regarding how fast this is happening, I would say around 10 new processes are being created every second, consuming an additional 300 MB per second. I have 24 GB of RAM on my system so everything comes to a halt after about 10-15 seconds.