When using VSCode Remote Development Open Folder in Container to develop in docker container in Mac, I can not find:
docker inspect containerIdBut I can still access the service in container from host browser.
VS Code uses SSH Tunnel to connect to remote machine. The port forwarding is simply creating this tunnel. You can do it without vscode with the command below if you have ssh client installed. You have to run this command from localhost shell prompt. (I assumed we want to connect to port 8080 on remote-machine using localhost:8085)
ssh -L 8085:remote-machine-ip:8080 remote-machine-ip
Now, from your browser, if you go to http://localhost:8085 it will show content from remote-machine's 8080 service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With