devcontainer-cli
The reference devcontainer CLI (@devcontainers/cli), installed globally with npm.
Installs the reference devcontainer CLI (devcontainer) as a global npm package.
It is the tool that reads a repository’s devcontainer.json, builds the image
(Features included), and runs the file’s lifecycle commands.
You rarely declare this recipe yourself: setting
sources[].devcontainer.enabled on a
workstation implies both this devtool and docker.
Declare it explicitly only to pin its version:
devtools:
- name: devcontainer-cli
version: "0.80.0"Version behavior
version | Result |
|---|---|
| omitted | the latest published release |
0.80.0 | that exact npm version |
A workstation that already has devcontainer on PATH keeps the release it has. A changed
version replaces that release on the next configuration pass.
Updates
With updatePolicy: latest and no version, the devcontainer CLI takes the
npm route: about once a day, it moves to the newest npm release. A devcontainer command that is already
running keeps its release.
Node.js
The recipe needs npm. If nodejs is
declared first, that Node is used; otherwise the recipe installs the distribution’s
Node.js and npm. A configuration that also declares npm
packages gets the
nodejs devtool added first when the workstation has no npm, so on Debian and Ubuntu the
tool runs on Node 24.
Notes
- The engine is a separate concern: this recipe installs the CLI only, and
dockerprovides what it drives. A devcontainer declaration implies both. - Works on Debian, Ubuntu, and Alpine.