S
S
Sergey Sokolov2020-02-23 13:44:45
Docker
Sergey Sokolov, 2020-02-23 13:44:45

How to connect VS Code Remote-SSH to both the host and the Docker container on it at the same time?

To work in VSCode with remote servers, I use the Remote-SSH extension from Microsoft.

When working with Docker containers, when the code is inside the Docker volume, I raise the container with OpenSSH with the Volume connected to it, and connect to it - this also starts node processes from VSC.

Everything is fine, you can work both on the host and inside the container at the same time.

But after restarting VSCode, when the same windows open, I can't connect to VSC on the host anymore.
Inside the container, norms are connected. Helps to manually kill processes nodeand reconnect VSC.

As I understand it, a lock is created somewhere, and for some reason the container overtakes the parent host.

What can be tweaked so that the VSC server on the host and inside the Docker container do not conflict?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question