diff options
author | Josh Spicer <joshspicer@github.com> | 2022-06-03 17:46:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 17:46:25 +0300 |
commit | c12a205ab8e195541acfe0cb654b4888e16ea05c (patch) | |
tree | a1a45ac7dec9f31fa62972a65414b6d6fd1fd60d /src/docker-in-docker/install.sh | |
parent | 283b8e1f8f5dec9e54199c107e772ce56683769e (diff) |
Pass options via environment variables (#39)
* up to docker-in-docker converted
* first pass at the rest of the features (and bash linting and updated CLI
* move shell linter to own file
* rename feature.json -> devcontainer-feature.json
* continue on error
* continue on error in right spot
* formatting
* fix AZ_VERSION
* update python
* restore variable name
* update linter actions, fix dind/dfd/desktop scripts, add test-scenaerios
* add tree because I like tree
* glob for shell linter
* fix test-scenarios
* shell linter
* more shell helper
Diffstat (limited to 'src/docker-in-docker/install.sh')
-rw-r--r-- | src/docker-in-docker/install.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index a525203..02dd260 100644 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh @@ -6,14 +6,15 @@ # # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md # Maintainer: The VS Code and Codespaces Teams -# -# Syntax: ./docker-in-docker-debian.sh [enable non-root docker access flag] [non-root user] [use moby] [Engine/CLI Version] [Major version for docker-compose] -ENABLE_NONROOT_DOCKER=${1:-"true"} -USERNAME=${2:-"automatic"} -USE_MOBY=${3:-"true"} -DOCKER_VERSION=${4:-"latest"} # The Docker/Moby Engine + CLI should match in version -DOCKER_DASH_COMPOSE_VERSION=${5:-"v1"} # v1 or v2 + +DOCKER_VERSION=${VERSION:-"latest"} # The Docker/Moby Engine + CLI should match in version +USE_MOBY=${MOBY:-"true"} +DOCKER_DASH_COMPOSE_VERSION=${DOCKER_DASH_COMPOSE_VERSION:-"v1"} # v1 or v2 + +ENABLE_NONROOT_DOCKER=${ENABLE_NONROOT_DOCKER:-"true"} +USERNAME=${USERNAME:-"automatic"} + MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy" DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy" @@ -40,7 +41,7 @@ fi if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then USERNAME="" POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") - for CURRENT_USER in ${POSSIBLE_USERS[@]}; do + for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do if id -u ${CURRENT_USER} > /dev/null 2>&1; then USERNAME=${CURRENT_USER} break |