How to "Attach Visual Studio Code" to container on remote EC2 instance

Viewed 590

For the last month I can only connect VS Code to remote docker containers maybe 10% of the time I try to do it. When it works, it works great, but I cannot reliably connect when I want to.

Right now I'm not setting docker.host in VS Code settings. Things have worked without setting that, some of the time. Right now I'm consistently seeing this:

  1. I can connect via SSH to the remote instance.
  2. I can see the docker container is running (docker ps).
  3. The Docker->containers list shows the container.
  4. But "Attach Visual Studio Code" does not show the container as an option.

My question is how can I attach to the container that's definitely right there and running?

1]

Maybe notable I have the Remote Extensions installed locally, but there is no option to install any of the extensions on the remote instance. And there is no "Attach To Running Container" option. I don't know how to get that option to come back. 1]

Thanks for any ideas.

0 Answers
Related