Skip to content

Commit 99bcc66

Browse files
author
Richard Cunningham
committed
Add old color feature for testing
1 parent 0f68482 commit 99bcc66

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "My Favorite Color",
3+
"id": "color",
4+
"version": "1.0.3",
5+
"description": "A feature to remind you of your favorite color",
6+
"options": {
7+
"favorite": {
8+
"type": "string",
9+
"enum": [
10+
"red",
11+
"gold",
12+
"green"
13+
],
14+
"default": "red",
15+
"description": "Choose your favorite color."
16+
}
17+
},
18+
"installsAfter": [
19+
"ghcr.io/devcontainers/features/common-utils"
20+
]
21+
}

src/color/install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
echo "Activating feature 'color'"
5+
echo "The provided favorite color is: ${FAVORITE}"
6+
7+
8+
# The 'install.sh' entrypoint script is always executed as the root user.
9+
#
10+
# These following environment variables are passed in by the dev container CLI.
11+
# These may be useful in instances where the context of the final
12+
# remoteUser or containerUser is useful.
13+
# For more details, see https://containers.dev/implementors/features#user-env-var
14+
echo "The effective dev container remoteUser is '$_REMOTE_USER'"
15+
echo "The effective dev container remoteUser's home directory is '$_REMOTE_USER_HOME'"
16+
17+
echo "The effective dev container containerUser is '$_CONTAINER_USER'"
18+
echo "The effective dev container containerUser's home directory is '$_CONTAINER_USER_HOME'"
19+
20+
cat > /usr/local/bin/color \
21+
<< EOF
22+
#!/bin/sh
23+
echo "my favorite color is ${FAVORITE}"
24+
EOF
25+
26+
chmod +x /usr/local/bin/color

0 commit comments

Comments
 (0)