diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-03-09 02:30:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 02:30:59 +0300 |
commit | de1e634a6755e10b27e52ad4e0aa44f025540074 (patch) | |
tree | 5e3b4365a10465e9e0dfb3549fc64e996a1e73fc /test | |
parent | fe449253f138f3c028627d3e9cc3d500d650b159 (diff) |
Docker fix - BuildKit is enabled but the buildx component is missing or broken (#478)feature_docker-outside-of-docker_1.1.0feature_docker-in-docker_2.1.0
* Docker fix - BuildKit is enabled but the buildx component is missing or broken
* nit
* fix test
Diffstat (limited to 'test')
-rw-r--r-- | test/docker-in-docker/Dockerfile | 1 | ||||
-rw-r--r-- | test/docker-in-docker/docker_build.sh | 13 | ||||
-rw-r--r-- | test/docker-in-docker/docker_build_2.sh | 13 | ||||
-rw-r--r-- | test/docker-in-docker/docker_build_older.sh | 13 | ||||
-rw-r--r-- | test/docker-in-docker/scenarios.json | 35 | ||||
-rw-r--r-- | test/docker-outside-of-docker/Dockerfile | 1 | ||||
-rw-r--r-- | test/docker-outside-of-docker/docker_build.sh | 13 | ||||
-rw-r--r-- | test/docker-outside-of-docker/docker_build_2.sh | 13 | ||||
-rw-r--r-- | test/docker-outside-of-docker/docker_build_older.sh | 13 | ||||
-rw-r--r-- | test/docker-outside-of-docker/scenarios.json | 33 |
10 files changed, 147 insertions, 1 deletions
diff --git a/test/docker-in-docker/Dockerfile b/test/docker-in-docker/Dockerfile new file mode 100644 index 0000000..9cc9f1a --- /dev/null +++ b/test/docker-in-docker/Dockerfile @@ -0,0 +1 @@ +FROM ubuntu:focal diff --git a/test/docker-in-docker/docker_build.sh b/test/docker-in-docker/docker_build.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-in-docker/docker_build.sh @@ -0,0 +1,13 @@ +#!/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-in-docker/docker_build_2.sh b/test/docker-in-docker/docker_build_2.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-in-docker/docker_build_2.sh @@ -0,0 +1,13 @@ +#!/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-in-docker/docker_build_older.sh b/test/docker-in-docker/docker_build_older.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-in-docker/docker_build_older.sh @@ -0,0 +1,13 @@ +#!/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-in-docker/scenarios.json b/test/docker-in-docker/scenarios.json index d37053a..5123d09 100644 --- a/test/docker-in-docker/scenarios.json +++ b/test/docker-in-docker/scenarios.json @@ -25,5 +25,38 @@ "azureDnsAutoDetection": false } } + }, + "docker_build": { + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "features": { + "docker-in-docker": { + "version": "latest", + "moby": "false", + "dockerDashComposeVersion": "v2" + } + }, + "remoteUser": "node" + }, + "docker_build_2": { + "image": "ubuntu:focal", + "features": { + "docker-in-docker": { + "version": "latest", + "installDockerBuildx": true, + "moby": "false", + "dockerDashComposeVersion": "v2" + } + } + }, + "docker_build_older": { + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "features": { + "docker-in-docker": { + "version": "20", + "moby": "false", + "dockerDashComposeVersion": "v2" + } + }, + "remoteUser": "node" } -}
\ No newline at end of file +} diff --git a/test/docker-outside-of-docker/Dockerfile b/test/docker-outside-of-docker/Dockerfile new file mode 100644 index 0000000..61217d9 --- /dev/null +++ b/test/docker-outside-of-docker/Dockerfile @@ -0,0 +1 @@ +FROM ubuntu:jammy diff --git a/test/docker-outside-of-docker/docker_build.sh b/test/docker-outside-of-docker/docker_build.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-outside-of-docker/docker_build.sh @@ -0,0 +1,13 @@ +#!/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_build_2.sh b/test/docker-outside-of-docker/docker_build_2.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-outside-of-docker/docker_build_2.sh @@ -0,0 +1,13 @@ +#!/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_build_older.sh b/test/docker-outside-of-docker/docker_build_older.sh new file mode 100644 index 0000000..742b222 --- /dev/null +++ b/test/docker-outside-of-docker/docker_build_older.sh @@ -0,0 +1,13 @@ +#!/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/scenarios.json b/test/docker-outside-of-docker/scenarios.json index 804b522..ad9b072 100644 --- a/test/docker-outside-of-docker/scenarios.json +++ b/test/docker-outside-of-docker/scenarios.json @@ -7,5 +7,38 @@ "version": "latest" } } + }, + "docker_build": { + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "features": { + "docker-outside-of-docker": { + "version": "latest", + "installDockerBuildx": true, + "moby": "false", + "dockerDashComposeVersion": "v2" + } + }, + "remoteUser": "node" + }, + "docker_build_2": { + "image": "ubuntu:focal", + "features": { + "docker-outside-of-docker": { + "version": "latest", + "moby": "false", + "dockerDashComposeVersion": "v2" + } + } + }, + "docker_build_older": { + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "features": { + "docker-outside-of-docker": { + "version": "20", + "moby": "false", + "dockerDashComposeVersion": "v2" + } + }, + "remoteUser": "node" } } |