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
In devcontainers.json when I have: "appPort": ["8000:8000"] and I build container, ports are like this:
But when I have "appPort": [8000] they are like this:
I thought these two settings were doing the same. But actually, bare 8000 number forwards only 127.0.0.1 which won't allow connections from outside of the host machine.
Is it a bug or a feature?
The text was updated successfully, but these errors were encountered:
Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. "8000:8010".
This could be clarified a bit by saying that the number syntax will only listen on that port on the loopback network interface.
In devcontainers.json when I have:
"appPort": ["8000:8000"]
and I build container, ports are like this:But when I have
"appPort": [8000]
they are like this:I thought these two settings were doing the same. But actually, bare 8000 number forwards only 127.0.0.1 which won't allow connections from outside of the host machine.
Is it a bug or a feature?
The text was updated successfully, but these errors were encountered: