From c6cd9d3a883d2c4903888914aafe27ed2c0004df Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Fri, 15 Sep 2023 17:46:37 +0000 Subject: [PATCH] add wine --- src/wine/devcontainer-feature.json | 21 +++++++++++++++++++++ src/wine/install.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/wine/devcontainer-feature.json create mode 100644 src/wine/install.sh diff --git a/src/wine/devcontainer-feature.json b/src/wine/devcontainer-feature.json new file mode 100644 index 0000000..963d22d --- /dev/null +++ b/src/wine/devcontainer-feature.json @@ -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" + ] +} diff --git a/src/wine/install.sh b/src/wine/install.sh new file mode 100644 index 0000000..883c25d --- /dev/null +++ b/src/wine/install.sh @@ -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