Skip to content

Commit

Permalink
Add old color feature for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Cunningham committed Nov 19, 2024
1 parent 0f68482 commit 99bcc66
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/color/devcontainer-feature.json
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"
]
}
26 changes: 26 additions & 0 deletions src/color/install.sh
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

0 comments on commit 99bcc66

Please sign in to comment.