Frequently Asked Questions
Development
Q: Can I connect multiple VS Code windows to a single container?
Yes! With your two windows open do the following on each:
- Connect both VS Code windows to the same host.
- Using one of the windows, open your project.
- Once your project is open, either build the container or reopen in the container.
- (Optional) To verify the current container name, type
docker ps
. - Using your 2nd window, press the remote connections button (bottom left corner).
- Select the option “Attach to Running Container…” and follow through the dialogues to select the container running in the other window (if necessary, check step 4.).
You now have 2 VS Code windows connected to the same container!
For more details, refer to this step in the container management tutorial.
Q: How do I run a long running job in the background on a server?
This is assuming that you are using a dev container or an operating system with tmux
installed. Here are quick start steps:
- In your terminal, type and run
tmux
. - Now run your long running job.
- Run
tmux detach
to detach from the tmux session. - Feel free to disconnect from the server (but leave your devcontainer running!)
- Reconnect to the server and reattach to the devcontainer.
- Run
tmux attach
- Your job will either be there running or completed!
For more details, refer to this step in the job management tutorial.