NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
In the example for docker-compose, the use of network_mode is used.
By using this feature, SSHD forwarding (which is required for IntelliJ or the Github CLI to work) does not work properly, remaining stuck in a loop. Tis feature is defined here:
Removing this line allows SSHD to forward and fixes this issue.
It is not required for port forwarding using devcontainer json syntax, and inter-connectivity works properly by using the <service_name>:<port> syntax (e.g. db:5432) in the connection string.
In the example for docker-compose, the use of
network_mode
is used.By using this feature, SSHD forwarding (which is required for IntelliJ or the Github CLI to work) does not work properly, remaining stuck in a loop. Tis feature is defined here:
https://github.com/microsoft/vscode-dev-containers/blob/5a084a93b0736ea86395ac99019a5b72a00b6341/container-templates/docker-compose/.devcontainer/docker-compose.yml#L24
Removing this line allows SSHD to forward and fixes this issue.
It is not required for port forwarding using devcontainer json syntax, and inter-connectivity works properly by using the
<service_name>:<port>
syntax (e.g.db:5432
) in the connection string.Example Configuration:
Example working Dev Container -> Postgres Container through the Postgres plugin for VsCode.
Example devcontainer app forwarding: