aboutsummaryrefslogtreecommitdiff
path: root/test/docker-outside-of-docker
diff options
context:
space:
mode:
Diffstat (limited to 'test/docker-outside-of-docker')
l---------test/docker-outside-of-docker/docker_build_moby.sh1
-rw-r--r--test/docker-outside-of-docker/docker_build_no_buildx.sh (renamed from test/docker-outside-of-docker/docker_build_2.sh)2
l---------test/docker-outside-of-docker/docker_build_no_buildx_moby.sh1
-rw-r--r--test/docker-outside-of-docker/docker_build_older.sh13
-rwxr-xr-xtest/docker-outside-of-docker/docker_dash_compose_v1.sh13
l---------test/docker-outside-of-docker/docker_dash_compose_v1_moby.sh1
-rwxr-xr-xtest/docker-outside-of-docker/docker_dash_compose_v2.sh13
l---------test/docker-outside-of-docker/docker_dash_compose_v2_moby.sh1
-rw-r--r--test/docker-outside-of-docker/docker_init.sh6
l---------test/docker-outside-of-docker/docker_init_debian.sh1
l---------test/docker-outside-of-docker/docker_init_moby.sh1
l---------test/docker-outside-of-docker/docker_init_ubuntu_22.sh1
-rw-r--r--test/docker-outside-of-docker/scenarios.json113
-rw-r--r--[-rwxr-xr-x]test/docker-outside-of-docker/test.sh9
14 files changed, 138 insertions, 38 deletions
diff --git a/test/docker-outside-of-docker/docker_build_moby.sh b/test/docker-outside-of-docker/docker_build_moby.sh
new file mode 120000
index 0000000..0b420db
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_build_moby.sh
@@ -0,0 +1 @@
+./docker_build.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_build_2.sh b/test/docker-outside-of-docker/docker_build_no_buildx.sh
index 742b222..7b3870d 100644
--- a/test/docker-outside-of-docker/docker_build_2.sh
+++ b/test/docker-outside-of-docker/docker_build_no_buildx.sh
@@ -6,7 +6,7 @@ set -e
source dev-container-features-test-lib
# Definition specific tests
-check "docker-buildx" docker buildx version
+check "no buildx" bash -c "docker buildx version 2>&1 | grep 'not a docker command'"
check "docker-build" docker build ./
# Report result
diff --git a/test/docker-outside-of-docker/docker_build_no_buildx_moby.sh b/test/docker-outside-of-docker/docker_build_no_buildx_moby.sh
new file mode 120000
index 0000000..00b72a3
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_build_no_buildx_moby.sh
@@ -0,0 +1 @@
+./docker_build_no_buildx.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_build_older.sh b/test/docker-outside-of-docker/docker_build_older.sh
deleted file mode 100644
index 742b222..0000000
--- a/test/docker-outside-of-docker/docker_build_older.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Optional: Import test library
-source dev-container-features-test-lib
-
-# Definition specific tests
-check "docker-buildx" docker buildx version
-check "docker-build" docker build ./
-
-# Report result
-reportResults
diff --git a/test/docker-outside-of-docker/docker_dash_compose_v1.sh b/test/docker-outside-of-docker/docker_dash_compose_v1.sh
new file mode 100755
index 0000000..d95f3cf
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_dash_compose_v1.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "docker compose" bash -c "docker compose version | grep -E '2.[0-9]+.[0-9]+'"
+check "docker-compose" bash -c "docker-compose --version | grep -E '1.[0-9]+.[0-9]+'"
+
+# Report result
+reportResults
diff --git a/test/docker-outside-of-docker/docker_dash_compose_v1_moby.sh b/test/docker-outside-of-docker/docker_dash_compose_v1_moby.sh
new file mode 120000
index 0000000..51dc7d2
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_dash_compose_v1_moby.sh
@@ -0,0 +1 @@
+./docker_dash_compose_v1.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_dash_compose_v2.sh b/test/docker-outside-of-docker/docker_dash_compose_v2.sh
new file mode 100755
index 0000000..8f2a104
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_dash_compose_v2.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "docker compose" bash -c "docker compose version | grep -E '2.[0-9]+.[0-9]+'"
+check "docker-compose" bash -c "docker-compose --version | grep -E '2.[0-9]+.[0-9]+'"
+
+# Report result
+reportResults
diff --git a/test/docker-outside-of-docker/docker_dash_compose_v2_moby.sh b/test/docker-outside-of-docker/docker_dash_compose_v2_moby.sh
new file mode 120000
index 0000000..78ae9bc
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_dash_compose_v2_moby.sh
@@ -0,0 +1 @@
+./docker_dash_compose_v2.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_init.sh b/test/docker-outside-of-docker/docker_init.sh
index 2164921..b47285e 100644
--- a/test/docker-outside-of-docker/docker_init.sh
+++ b/test/docker-outside-of-docker/docker_init.sh
@@ -5,11 +5,15 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib
+check "docker buildx" bash -c "docker buildx version"
+check "docker compose" bash -c "docker compose version"
+check "docker-compose" bash -c "docker-compose --version"
+
check "docker-init-exists" bash -c "ls /usr/local/share/docker-init.sh"
check "log-exists" bash -c "ls /tmp/vscr-docker-from-docker.log"
check "log-contents-for-success" bash -c "cat /tmp/vscr-docker-from-docker.log | grep 'Success'"
check "log-contents" bash -c "cat /tmp/vscr-docker-from-docker.log | grep 'Proxying /var/run/docker-host.sock to /var/run/docker.sock for vscode'"
-check "docker-ps" bash -c "docker ps"
+check "docker-ps" bash -c "docker ps >/dev/null"
# Report result
reportResults \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_init_debian.sh b/test/docker-outside-of-docker/docker_init_debian.sh
new file mode 120000
index 0000000..7458cc9
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_init_debian.sh
@@ -0,0 +1 @@
+./docker_init.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_init_moby.sh b/test/docker-outside-of-docker/docker_init_moby.sh
new file mode 120000
index 0000000..7458cc9
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_init_moby.sh
@@ -0,0 +1 @@
+./docker_init.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/docker_init_ubuntu_22.sh b/test/docker-outside-of-docker/docker_init_ubuntu_22.sh
new file mode 120000
index 0000000..7458cc9
--- /dev/null
+++ b/test/docker-outside-of-docker/docker_init_ubuntu_22.sh
@@ -0,0 +1 @@
+./docker_init.sh \ No newline at end of file
diff --git a/test/docker-outside-of-docker/scenarios.json b/test/docker-outside-of-docker/scenarios.json
index ad9b072..be63470 100644
--- a/test/docker-outside-of-docker/scenarios.json
+++ b/test/docker-outside-of-docker/scenarios.json
@@ -1,44 +1,119 @@
{
+ "docker_init_moby": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": true
+ }
+ },
+ "containerUser": "vscode"
+ },
"docker_init": {
- "image": "mcr.microsoft.com/devcontainers/base",
- "remoteUser": "vscode",
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": false
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_init_ubuntu_22": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"features": {
"docker-outside-of-docker": {
- "version": "latest"
+ "moby": false
}
- }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_init_debian": {
+ "image": "mcr.microsoft.com/devcontainers/base:debian",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": false
+ }
+ },
+ "containerUser": "vscode"
},
"docker_build": {
- "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
"features": {
"docker-outside-of-docker": {
- "version": "latest",
- "installDockerBuildx": true,
- "moby": "false",
+ "moby": false,
"dockerDashComposeVersion": "v2"
}
},
- "remoteUser": "node"
+ "containerUser": "vscode"
},
- "docker_build_2": {
- "image": "ubuntu:focal",
+ "docker_build_moby": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
"features": {
"docker-outside-of-docker": {
- "version": "latest",
- "moby": "false",
- "dockerDashComposeVersion": "v2"
+ "moby": true
}
- }
+ },
+ "containerUser": "vscode"
},
- "docker_build_older": {
- "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
+ "docker_build_no_buildx": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
"features": {
"docker-outside-of-docker": {
"version": "20",
- "moby": "false",
+ "moby": false,
+ "installDockerBuildx": false
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_build_no_buildx_moby": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "version": "20",
+ "moby": true,
+ "installDockerBuildx": false
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_dash_compose_v1": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": false,
+ "dockerDashComposeVersion": "v1"
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_dash_compose_v1_moby": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": true,
+ "dockerDashComposeVersion": "v1"
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_dash_compose_v2": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": false,
+ "dockerDashComposeVersion": "v2"
+ }
+ },
+ "containerUser": "vscode"
+ },
+ "docker_dash_compose_v2_moby": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
+ "features": {
+ "docker-outside-of-docker": {
+ "moby": true,
"dockerDashComposeVersion": "v2"
}
},
- "remoteUser": "node"
+ "containerUser": "vscode"
}
}
diff --git a/test/docker-outside-of-docker/test.sh b/test/docker-outside-of-docker/test.sh
index 517737a..fe9098e 100755..100644
--- a/test/docker-outside-of-docker/test.sh
+++ b/test/docker-outside-of-docker/test.sh
@@ -5,10 +5,11 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib
-# Definition specific tests
-check "version" docker --version
-check "docker-init-exists" bash -c "ls /usr/local/share/docker-init.sh"
-check "docker-ps" bash -c "docker ps"
+check "docker buildx" bash -c "docker buildx version"
+check "docker compose" bash -c "docker compose version"
+check "docker-compose" bash -c "docker-compose --version"
+
+check "docker-ps" bash -c "docker ps >/dev/null"
# Report result
reportResults \ No newline at end of file