Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docker-in-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Create child containers *inside* a container, independent from the host's docker
| version | Select or enter a Docker/Moby Engine version. (Availability can vary by OS version.) | string | latest |
| moby | Install OSS Moby build instead of Docker CE | boolean | true |
| mobyBuildxVersion | Install a specific version of moby-buildx when using Moby | string | latest |
| dockerDashComposeVersion | Default version of Docker Compose (v1, v2 or none) | string | v2 |
| dockerDashComposeVersion | Default version of Docker Compose (v1, v2, latest or none) | string | latest |
| azureDnsAutoDetection | Allow automatically setting the dockerd DNS server when the installation script detects it is running in Azure | boolean | true |
| dockerDefaultAddressPool | Define default address pools for Docker networks. e.g. base=192.168.0.0/16,size=24 | string | - |
| installDockerBuildx | Install Docker Buildx | boolean | true |
Expand Down
7 changes: 4 additions & 3 deletions src/docker-in-docker/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "docker-in-docker",
"version": "3.0.1",
"version": "3.1.0",
"name": "Docker (Docker-in-Docker)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
Expand Down Expand Up @@ -29,11 +29,12 @@
"type": "string",
"enum": [
"none",
"latest",
"v1",
"v2"
],
"default": "v2",
"description": "Default version of Docker Compose (v1, v2 or none)"
"default": "latest",
"description": "Default version of Docker Compose (v1, v2, latest or none)"
},
"azureDnsAutoDetection": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/docker-in-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DOCKER_VERSION="${VERSION:-"latest"}" # The Docker/Moby Engine + CLI should match in version
USE_MOBY="${MOBY:-"true"}"
MOBY_BUILDX_VERSION="${MOBYBUILDXVERSION:-"latest"}"
DOCKER_DASH_COMPOSE_VERSION="${DOCKERDASHCOMPOSEVERSION:-"v2"}" #v1, v2 or none
DOCKER_DASH_COMPOSE_VERSION="${DOCKERDASHCOMPOSEVERSION:-"latest"}" #v1, v2, latest or none
AZURE_DNS_AUTO_DETECTION="${AZUREDNSAUTODETECTION:-"true"}"
DOCKER_DEFAULT_ADDRESS_POOL="${DOCKERDEFAULTADDRESSPOOL:-""}"
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
Expand Down
1 change: 1 addition & 0 deletions test/docker-in-docker/docker_compose_latest_moby.sh
14 changes: 14 additions & 0 deletions test/docker-in-docker/docker_compose_latest_no_moby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/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 '[0-9]+\.[0-9]+\.[0-9]+'"
check "docker-compose" bash -c "docker-compose --version | grep -E '[0-9]+\.[0-9]+\.[0-9]+'"
check "installs compose as docker-compose" bash -c "[[ -f /usr/local/bin/docker-compose ]]"

# Report result
reportResults
20 changes: 20 additions & 0 deletions test/docker-in-docker/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,26 @@
}
}
},
"docker_compose_latest_moby": {
"image": "mcr.microsoft.com/devcontainers/base:noble",
"features": {
"docker-in-docker": {
"moby": true,
"installDockerBuildx": true,
"dockerDashComposeVersion": "latest"
}
}
},
"docker_compose_latest_no_moby": {
"image": "mcr.microsoft.com/devcontainers/base:noble",
"features": {
"docker-in-docker": {
"moby": false,
"installDockerBuildx": true,
"dockerDashComposeVersion": "latest"
}
}
},
"docker_build_fallback_buildx": {
"image": "ubuntu:noble",
"features": {
Expand Down
Loading