DevContainer/Feature/Argument
Properties
DevContainer Feature Arguments
Overview
- Devcontainer DevContainer/Features are OCI images that include a
devcontainer-feature.jsonspecification and aninstall.shscript. - Feature arguments are declared as
optionsindevcontainer-feature.json, passed fromdevcontainer.json, and exposed toinstall.shasFEATURE_OPTION_*environment variables.
- Devcontainer DevContainer/Features are OCI images that include a
Where Arguments Are Defined
How Users Pass Arguments
How Features Receive Arguments
- The feature system converts options to environment variables in this format:
- text
FEATURE_OPTION_<OPTION_NAME> - Example:
- text
FEATURE_OPTION_VERSION=2 - Option-name normalization:
- Example mapping:
- Example
install.shusage: - bash
AWS_VERSION="${FEATURE_OPTION_VERSION}" if [ "$AWS_VERSION" = "2" ]; then install_aws_v2 fi
Lifecycle Behavior
Common Uses
Limitation
Mental Model
References