For a while I’ve been getting annoyed with my workflow, when I open a project it looks like this

code project-folder/

Followed by waiting a few seconds, click ‘Reopen in container’, wait a few more seconds and off we go.

Turns out, I’ve been missing a trick, a trick that goes by the name of Devcontainer CLI

Now there is a small gotcha with this, don’t install the npm package as described in their README. If you do that, you won’t be able to run the only feature that I really use, opening folders in a devcontainer directly from the CLI.

Instead, using the command pallette of VS Code, select >Dev Containers: install devcontainer CLI. This will take care of installing the CLI and map the location into your PATH..

Now that’s out of the way, you can simply do

devcontainer open project-folder/

Bingo, VS Code will open and directly start your devcontainer.

Tags:

Updated:

If you found this content helpful, please consider sponsoring me on GitHub or alternatively buying me a coffee

Comments