Support forwarding ports from non-localhost
hosts
#9420
Unanswered
jarrodldavis
asked this question in
Codespaces
Replies: 1 comment 2 replies
-
If you checkout the
Which I agree is less than optimal, although the "does not yet" wording gives me hope that this is on their todo list. In the interim, I've been using using socat as a workaround. Added this to my
Added MySQL service to my
Added this to my forwardPorts in
And the following to my
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The other Visual Studio Code Remote extensions support forwarding ports from non-
localhost
hosts inside the container, so GitHub Codespaces should support it too. This is useful for exposing ports from Docker Compose services, such as a database, without having to use the usual hack of putting both containers on the same network (like is done here and here).I've tried doing this on Codespaces (even following these testing directions using this repository) and it doesn't work.
forwardPorts
entries indevcontainer.json
appear to be ignored if they are ahost:port
string, and manually forwarding a port using ahost:port
string appears to silently drop the host and only forward the port fromlocalhost
in the container.Beta Was this translation helpful? Give feedback.
All reactions