title: VS Code: connect a docker container in a remote server
body: <p>I want to work in a container in a remote server.
  But it doesn't work.</p>
  <p>Environment:</p>
  <p>Local: Windows 10</p>
  <p>Local Terminal for ssh: WSL in Windows 10</p>
  <p>Server: Ubuntu 18.04</p>
  <p>I checked these two articles.</p>
  <p><a href="https://code.visualstudio.com/docs/remote/containers-advanced" rel="noreferrer">https://code.visualstudio.com/docs/remote/containers-advanced</a>
  <a href="https://code.visualstudio.com/docs/containers/ssh" rel="noreferrer">https://code.visualstudio.com/docs/containers/ssh</a></p>
  <p>I followed these steps.</p>
  <ol>
  <li>I installed [Remote Development] extension in VS Code.</li>
  <li>Remote-SSH: Connect to host. It works fine.</li>
  <li>I Installed [Docker] extension on the remoter server.</li>
  <li>Now I can see my containers and images in a docker tab.</li>
  <li>I clicked one container and clicked [Attach Visual Studio Code] and it says There are no running containers to attach to.</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/YopCD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YopCD.png" alt="enter image description here" /></a></p>