vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

Automatically forward ports when used in remote context

Open samwho opened this issue 5 years ago • 4 comments

I find myself developing on a VM and running Docker on that VM as part of my day-job workflow. Something that would be really nice is if the Docker plugin could automatically forward all of the ports in my docker-compose.yml so that I don't have to add them manually to my workspace.

If this is already an option somewhere and I've missed it, please do let me know. 🙏

samwho avatar Mar 05 '21 11:03 samwho

By port forwarding do you mean, opening the ports on the host so that the exposed ports in the container can be accessed, or more like the magic port forwarding that the Remote extensions do?

bwateratmsft avatar Mar 05 '21 13:03 bwateratmsft

The magic port forwarding that remote extensions do.

samwho avatar Mar 28 '21 12:03 samwho

This guide might also have some helpful info: https://code.visualstudio.com/docs/remote/ssh#_forwarding-a-port-creating-ssh-tunnel

bwateratmsft avatar Mar 29 '21 13:03 bwateratmsft

Thanks for the link. I'm able to create the forwards manually, so this isn't a blocking problem at all. It would just be nice if Docker were able to do it for me, spare me a few clicks. 😄

samwho avatar Mar 29 '21 13:03 samwho