Docker Desktop 4.30.0 upgrade breaks web-based container

I have a Dev Container project PRQL that I use with Docker Desktop on Windows. It has worked fine for over a year.

Most recently, I had been using Docker Desktop 4.29.0 on Windows, but I noticed that 4.30.0 was available. And when I upgraded, I found that parts of the Dev Container stopped working.

Details:

The Dev Container has three commands to build various components. For example, task web:run-website builds the public website and displays it through a web browser. The other two components are the Playground and the Book (the documentation).

Prior to the upgrade to 4.30.0, I could run these commands and verify the contents in the browser for all three components

After the upgrade, only the Website works in the browser. For the other two, the Dev Container builds the component, but when I go to the website I get a blank page. Using curl from a host terminal gives this:

?130 % curl -v  http://localhost:5173/playground/playground
*   Trying [::1]:5173...
* connect to ::1 port 5173 failed: Connection refused
*   Trying 127.0.0.1:5173...
* Connected to localhost (127.0.0.1) port 5173
> GET /playground/playground HTTP/1.1
> Host: localhost:5173
> User-Agent: curl/8.4.0
> Accept: */*
>

How can I troubleshoot this? Many thanks.

NB: This problem was originally reported on a Mac, but was replicated (especially the upgrade to 4.30.0) on Windows 11.

Solution: I solved this by binding to address 0.0.0.0 in the DevContainer commands to run each of the components. (Previously, each of the commands used some variety of “localhost”, “127.0.0.1”, etc.) Forcing them to use 0.0.0.0 works great.

Thanks to visual studio code - Cannot connect from host to published port of VSCode Dev Containers since Docker 26 - Stack Overflow for a hint.