Web-Dev-Server is incompatible with Docker containers
See original GitHub issueExpected Behavior
Should be able to serve apps inside Docker containers.
Current Behavior
Container mounts correctly and the server starts but cannot be connected to on the host machine.
Steps to Reproduce
- Create a new workspace
- Generate a simple react app called myTodoApp
- docker run -it -p 4200:4200 -v $PWD:/home/node node:12 yarn --cwd /home/node nx serve myTodoApp --host=0.0.0.0
Context
- Nx: 8.5.0
- Docker for Mac: Docker version 19.03.2, build 6a30dfc
Other
The issue is caused by --host=0.0.0.0 being ignored by dev-server.impl.ts at line 79
If I remove the check allowing 0.0.0.0 through, I can then connect to the server. I use docker to run related Nx apps together during development.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
 Top Results From Across the Web
Top Results From Across the Web
Docker's image and host are incompatible - Stack Overflow
This image is published to a repository on AWS ECS, and I have setup tasks and services and clusters all OK. However my...
Read more >Breaking changes and incompatibilities - Docker Documentation
The following list compiles any updates to Docker Engine that created backwards-incompatibility for old versions of Docker tools.
Read more >Troubleshoot topics | Docker Documentation
From Settings, select Resources and then File sharing. Share the drive that contains the Dockerfile and volume. Topics for Mac  . Incompatible...
Read more >Workarounds for common problems - Docker Documentation
Docker Desktop fails to start when anti-virus software is installed  . Some anti-virus software may be incompatible with Hyper-V and Microsoft Windows...
Read more >docker compose up - Docker Documentation
docker compose up: Builds, (re)creates, starts, and attaches to containers for a service. ... dependent containers. Incompatible with --no-recreate.
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Based on the code it looks like the only thing it can affect is live reloading.
Folks, are you interesting in seeing if it affects live reloading? If yes, we can leave the check as is and maybe another flag. If not, we can just remove it.
Fixed by #2129 🎉