I regularly open Visual Studio Code via code .
and then have to click the Re-open in Container button.
Am I missing any shortcut to force it to do this from the command line?
To attach to a Docker container, either select Remote-Containers: Attach to Running Container... from the Command Palette (F1) or use the Remote Explorer in the Activity Bar and from the Containers view, select the Attach to Container inline action on the container you want to connect to.
Opening a terminal in a container from VS Code is simple. Once you've opened a folder in a container, any terminal window you open in VS Code (Terminal > New Terminal) will automatically run in the container rather than locally.
You can install Visual Studio Build Tools into a Windows container to support continuous integration and continuous delivery (CI/CD) workflows. This article guides you through what Docker configuration changes are required as well as what workloads and components you can install in a container.
Open the project in Visual Studio, and choose one of the following options: Select Docker Support from the Project menu. Right-click the project in Solution Explorer and select Add > Docker Support.
There is a way to do this GUIcally in Windows. I suspect this will also work for SSH / WSL workspaces.
[Dev Container]
list item (mine shows localhost:2375
because that's my docker host). You might like to pin it.You can open devcontainer directly with devcontainer CLI.
Install devcontainer CLI by running
Remote-Containers: Install devcontainer CLI
from VS Code. Then just run:
devcontainer open
in the same directory where you'd run code .
and you will skip the Re-open step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With