-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
Dev Containers do not work out of box on Windows since Docker 26.
When Docusaurus is started via start or serve then the dev server will bind to an IPv6 loopback by default when listening to localhost.
VS Code remote does not support forwarding IPv6
Reproducible demo
No response
Steps to reproduce
- Clone the docusaurus repository or use a dev container configuration for a repo that uses Docusaurus (e.g. okd-project/okd-web)
- On a Windows machine running Docker 26+, open the project in dev container
- Run either
docusaurus startordocusaurus serve - Note how although port is reported as forwarded (3000) and the browser opens, it fails to connect and the browser times out
Expected behavior
The dev container works out of box with port forwarding
Actual behavior
The internal webpack dev server is binding only to an IPv6 loopback address.
This is due to a change in Docker Desktop introduced in v26 moby/moby#47062
Other projects have also been affected by this e.g. vitejs/vite#16522
An issue in VS Code remote has been open for some time for a resolution microsoft/vscode-remote-release#7029
Current workarounds in ViteJS include recommendations to alter Devcontianer to disable IPv6 or to manually set the address of the dev server to a V4 address (ie 127.0.0.1)
Your environment
- Public source code:
N/A(although present on okd-project/okd-web and this repo!) - Public site URL:
N/A - Docusaurus version used: latest
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
WSL version: 2.3.22.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22635.4580
C:\Users\Zed> docker --version
Docker version 27.4.0, build bde2b89
C:\Users\Zed>
Self-service
- I'd be willing to fix this bug myself.