-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Richard Cunningham
committed
Nov 19, 2024
1 parent
0f68482
commit 99bcc66
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "My Favorite Color", | ||
"id": "color", | ||
"version": "1.0.3", | ||
"description": "A feature to remind you of your favorite color", | ||
"options": { | ||
"favorite": { | ||
"type": "string", | ||
"enum": [ | ||
"red", | ||
"gold", | ||
"green" | ||
], | ||
"default": "red", | ||
"description": "Choose your favorite color." | ||
} | ||
}, | ||
"installsAfter": [ | ||
"ghcr.io/devcontainers/features/common-utils" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
echo "Activating feature 'color'" | ||
echo "The provided favorite color is: ${FAVORITE}" | ||
|
||
|
||
# The 'install.sh' entrypoint script is always executed as the root user. | ||
# | ||
# These following environment variables are passed in by the dev container CLI. | ||
# These may be useful in instances where the context of the final | ||
# remoteUser or containerUser is useful. | ||
# For more details, see https://containers.dev/implementors/features#user-env-var | ||
echo "The effective dev container remoteUser is '$_REMOTE_USER'" | ||
echo "The effective dev container remoteUser's home directory is '$_REMOTE_USER_HOME'" | ||
|
||
echo "The effective dev container containerUser is '$_CONTAINER_USER'" | ||
echo "The effective dev container containerUser's home directory is '$_CONTAINER_USER_HOME'" | ||
|
||
cat > /usr/local/bin/color \ | ||
<< EOF | ||
#!/bin/sh | ||
echo "my favorite color is ${FAVORITE}" | ||
EOF | ||
|
||
chmod +x /usr/local/bin/color |