Skip to content

Use ocx in a dev container

The ocx Dev Container Feature installs the ocx command-line tool in a dev container and restores the tools your project pins in ocx.toml.

{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/ocx-sh/devcontainer-features/ocx:1": {}
}
}

Add ocx with one line

Add the feature reference ghcr.io/ocx-sh/devcontainer-features/ocx:1 to the features object of your devcontainer.json, then rebuild the container. Open a terminal and run ocx version. The quickstart walks through the first run and adds a tool.

This documentation is for developers and platform teams who add the feature to a devcontainer.json. The tag :1 keeps the feature on major version 1, so a rebuild takes minor and patch releases without an edit to your file.

Pick a goal

Look it up