dev-environments icon indicating copy to clipboard operation
dev-environments copied to clipboard

Docker Networking Over LAN

Open EvanSchalton opened this issue 4 years ago • 1 comments

Describe the bug Former S/O Post When building a UI (Angular) in a dev container and running it with --host=0.0.0.0 --port=4200 and forwardPorts: [4200] with EXPOSE 4200 in the dockerfile I can no longer access the webapp over local host (since 4.1.1)

To Reproduce Steps to reproduce the behavior: Create a Node/Typescript dev container Update the devcontainer.json with forwardPorts: [4200] Update the Dockerfile with EXPOSE 4200 install the angular CLI and create a new project ng new test-app run the app using ng serve --host=0.0.0.0 --port=4200 identify your computer's IP address, and from trusted local network navigate to 192.168.xxx.xxx:4200 --Error connection refused--

Expected behavior Should show the angular application

Screenshots N/A

Desktop (please complete the following information):

  • OS: Both Windows 10 & iOS
  • Version [e.g. 22]

Version of Docker Desktop:
You can find the version by clicking on the About Docker Desktop menu

Version 4.2.0 (70708)
Engine: 20.10.10
Compose: 1.29.2
Credential Helper: 0.6.4
Kubernetes: v1.21.5
Snyk: v1.563.0

Additional context This used to work back in 4.1.1

EvanSchalton avatar Dec 21 '21 06:12 EvanSchalton

Hi @EvanSchalton

Are you using Docker Dev Environments or Dev Containers from VsCode? If I'm looking to the Stack Overflow Post, it seems to be related to Microsoft Dev Containers and not Docker Dev Environments If so, I think the best place to report this issue should be this repo

glours avatar Dec 23 '21 16:12 glours