You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remote OS Version: Docker whatever the node containers use
Remote Extension/Connection Type: SSH/Docker/WSL
I'm not sure if I'm misunderstanding how something works, or not, but my Dockerfile has an EXPOSE 3000 in it, indicating that port 3000 should be available for mapping to the outside world. When I build that container and connect to it with Remote-Containers, I am unable to successfully port forward that to outside of the container, so it can be reached from the local browser. I have tested it inside the container, and it is reachable, but the port forwarding command does not forward it. It says that it tries to forward "undefined", which fails.
Erich Gamma (@egamma) the problem on top of that is that I can't forward the port dynamically -- when I select it from the list, or enter it manually, it tries to forward port "undefined", which fails.
I can't forward the port dynamically -- when I select it from the list, or enter it manually, it tries to forward port "undefined", which fails.
Can you please file a separate issue on the dynamic port forwarding failure, this looks like a separate bug. Please include a screenshot of what is shown in the quickpick dialog box when you select a port.
Since it looks like the separate issue about dynamic port forwarding has been addressed and there hasn't been new discussion here, I'm thinking we can close this issue? Eric Blade (@ericblade) if you don't have any other outstanding questions or requests here, I will go ahead and close it.
Activity
egamma commentedon May 6, 2019
Eric Blade (@ericblade) the EXPOSE statement in a Dockerfile is currently not honored when running the container. You have to either define the port as an
appPortin devcontainer.json or forward the port dynamically. pls see https://code.visualstudio.com/docs/remote/containers#_forwarding-a-portericblade commentedon May 6, 2019
Erich Gamma (@egamma) the problem on top of that is that I can't forward the port dynamically -- when I select it from the list, or enter it manually, it tries to forward port "undefined", which fails.
I'll try the appPort and see if that helps.
ericblade commentedon May 7, 2019
update: appPort does work, after rebuilding the container. still find it odd that asking it to forward the exposed port dynamically fails, though
egamma commentedon May 7, 2019
Eric Blade (@ericblade)
Can you please file a separate issue on the dynamic port forwarding failure, this looks like a separate bug. Please include a screenshot of what is shown in the quickpick dialog box when you select a port.
chrmarti commentedon May 7, 2019
Note:
docker run's--publish-all/-Pwould publish all exposed ports.bamurtaugh commentedon Oct 16, 2020
Since it looks like the separate issue about dynamic port forwarding has been addressed and there hasn't been new discussion here, I'm thinking we can close this issue? Eric Blade (@ericblade) if you don't have any other outstanding questions or requests here, I will go ahead and close it.
ericblade commentedon Oct 17, 2020
I"m thinking since I haven't attempted to use this in about a year now, it's probably not relevant, or been solved.