aboutsummaryrefslogtreecommitdiff
path: root/src/docker-in-docker
diff options
context:
space:
mode:
Diffstat (limited to 'src/docker-in-docker')
-rw-r--r--src/docker-in-docker/devcontainer-feature.json (renamed from src/docker-in-docker/feature.json)19
-rw-r--r--src/docker-in-docker/install.sh17
2 files changed, 22 insertions, 14 deletions
diff --git a/src/docker-in-docker/feature.json b/src/docker-in-docker/devcontainer-feature.json
index 0aa95e9..096756d 100644
--- a/src/docker-in-docker/feature.json
+++ b/src/docker-in-docker/devcontainer-feature.json
@@ -4,7 +4,11 @@
"options": {
"version": {
"type": "string",
- "proposals": ["latest", "none", "20.10" ],
+ "proposals": [
+ "latest",
+ "none",
+ "20.10"
+ ],
"default": "latest",
"description": "Select or enter a Docker/Moby Engine version. (Availability can vary by OS version.)"
},
@@ -13,9 +17,12 @@
"default": true,
"description": "Install OSS Moby build instead of Docker CE"
},
- "dockerDashComposeVersion": {
+ "docker_dash_compose_version": {
"type": "string",
- "enum": ["v1", "v2" ],
+ "enum": [
+ "v1",
+ "v2"
+ ],
"default": "v1",
"description": "Default version of Docker Compose (v1 or v2)"
}
@@ -30,9 +37,9 @@
],
"mounts": [
{
- "source":"dind-var-lib-docker",
- "target":"/var/lib/docker",
- "type":"volume"
+ "source": "dind-var-lib-docker",
+ "target": "/var/lib/docker",
+ "type": "volume"
}
],
"install": {
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