question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Web-Dev-Server is incompatible with Docker containers

See original GitHub issue

Expected 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

  1. Create a new workspace
  2. Generate a simple react app called myTodoApp
  3. 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

3reactions
vsavkincommented, Oct 23, 2019

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.

0reactions
FrozenPandazcommented, Dec 6, 2019

Fixed by #2129 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found