Open darthtechworker opened 6 months ago
I tried the same on another machine with docker 4.29.0 and this works as expected. For further testing, I also upgraded the docker desktop in this machine to 4.30.0 and I see the issue as described above. So, clearly this bug was introduced in 4.30.0. Was any changes made on how host network interacts with docker network?
cc @djs55
This happens when pairing docker desktop 4.30.0 with vscode devcontainers on Windows too.
Docker Desktop on window updated to v4.30.0 this morning, and can confirm that port forwarding is no longer working
Update: a downgrade to 4.29.0 has vscode devcontainer port forwarding working again. After rebuilding the containers.
Downgrading to 4.29.0 or 4.27.2 quickly causes docker desktop to automatically exit, uninstall and install the latest 4.30.0 even with "Automatically check for updates" and "Always download updates" unchecked.
We are facing the same with both docker desktop on Windows and Linux. Downgrading to 4.29.0 fixed it.
Facing the same issues on Docker for Windows latest version 4.31.0
I can confirm that 4.31.0 on Mac has this issue. Rolling back to 4.29.0 is a workaround.
Another workaround is adding the following to the vite config:
server: {
host: '127.0.0.1'
}
Same here, on MacOs, can confirm 4.31.0 same issue, downgrade to 4.29.0 did the trick as a workaround
I tried it with 4.32.0 on MacOS and get the same issue, the port forwarding does not work.
Not related to Mac, but I faced the same issue on Docker for Windows 4.32.0.
Same issue here, Mac, version 4.32.0 and 4.31.1
Another workaround is adding the following to the vite config:
server: { host: '127.0.0.1' }
Or angular: ng serve --host 127.0.0.1
Version 4.32.0 (157355).
Remark: the open port is not displayed in Docker Desktop (Mac) in the container list, but it works...
The issue occurs in Windows 22631.4037 with Docker version 4.33.1. I need to rollback to Docker ver. 4.29.0
Another workaround is adding the following to the vite config:
server: { host: '127.0.0.1' }
Or angular: ng serve --host 127.0.0.1
Version 4.32.0 (157355).
Remark: the open port is not displayed in Docker Desktop (Mac) in the container list, but it works...
Worked for me in Manjaro 24.0.7 and Docker version 27.1.1, build 63125853e3 Also when I do docker ps
it's not displaying the forwarded ports.
It's been about six months and this problem remains unfixed without a workaround. Clearly, Docker doesn't think it's their problem. Is it actually a VS Code issue? Or something that needs updating in dev container configurations?
Where do we go from here? If someone hasn't done so, open an issue with VS Code and see if we can get some more traction.
Can confirm that accessing Angular app in devcontainer works only when --host 127.0.0.1 is specified. Docker 4.34 Before update it worked without host specification.
Also I don't think this issue has correct name. Auto port forwarding works ok, it's just that now apps binds to different host I guess.
Can confirm that switching from "ng serve --port=4000"
to "ng serve --port=4000 --host=127.0.0.1"
solved the connection issue for Angular using devcontainers in WSL2.
Description
4.30.0 breaks auto port forwarding in VScode dev containers. With 4.29.0 (or whatever was before 4.30.0/today's update) I could start my dev container and run
npm run dev
and access my website viahttp://localhost:5173
in the browser. That does not work anymore.I can make it work by doing npm run dev -- --host (but I did not have to do that before today's update and VScode did not release any updates today for this).
Reproduce
Dev Containers: Rebuild Container
npm i
inside the containerrpm run dev
inside the containerhttp://localhost:5173
in your browserExpected behavior
A simple react website should load.
docker version
docker info
Diagnostics ID
BC1CB2B2-B69E-4396-8D7A-B7A17288F241/20240510045331
Additional Info
No response