Installs the opencode AI coding agent CLI and ensures volume-mounted data directories are owned by the correct user.
"features": {
"ghcr.io/wcgomes/devcontainer-features/opencode:0": {}
}| Options Id | Description | Type | Default Value |
|---|---|---|---|
| username | Username to install opencode for. Defaults to _REMOTE_USER (the container's remote user). | string | - |
| version | Version to install (e.g. 1.3.17). Empty = latest. | string | - |
sst-dev.opencode
Opencode stores its configuration, data, and state under ~/.opencode in three subdirectories:
config– configuration filesdata– project data and cachesstate– runtime state
When these directories are volume-mounted into the container, they may be owned by root depending on how the volumes are created. The opencode-fix-permissions script runs on container start to chown these directories to the specified user, ensuring opencode can read and write them without permission errors.
If you share the same ~/.opencode volume mounts across multiple projects, be aware that opencode's state and data will be shared as well. This can be useful for preserving context between projects, but may also cause unexpected behaviour if projects have conflicting configurations. Consider using separate volume mounts per project if isolation is needed.
Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.