I'm using VSCode remote development to run and debug a django project inside a Docker container. In my devcontainer.json
I forwarded the port 8000
"forwardPorts": [8000],
and this is my launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/myapp/manage.py",
"args": [
"runserver",
"0.0.0.0:8000"
],
"django": true
}
]
}
When I start the debug with such a configuration, I see 4 ports forwarded: port 8000 and other 3 random high ports
8000 -> localhost:8000 (the only one I'd expect to see)
34075 -> 127.0.0.1:34075
37301 -> 127.0.0.1:37301
42129 -> 127.0.0.1:42129
I'm wondering why those three ports are forwarded and how I can avoid it.