This commit is contained in:
Maxim Slipenko 2023-09-15 17:46:37 +00:00 committed by GitHub
parent 07e55c1006
commit c6cd9d3a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,21 @@
{
"name": "Wine",
"id": "wine",
"version": "1.0.0",
"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
src/wine/install.sh Normal file
View File

@ -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