Skip to content

Commit 870e4c1

Browse files
committed
[docker-in-docker] - Fix for multiple vulnerability issues related to docker compose-switch component.
1 parent e9cfd3f commit 870e4c1

7 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/docker-in-docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Create child containers *inside* a container, independent from the host's docker
2222
| azureDnsAutoDetection | Allow automatically setting the dockerd DNS server when the installation script detects it is running in Azure | boolean | true |
2323
| dockerDefaultAddressPool | Define default address pools for Docker networks. e.g. base=192.168.0.0/16,size=24 | string | - |
2424
| installDockerBuildx | Install Docker Buildx | boolean | true |
25-
| installDockerComposeSwitch | Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter. | boolean | true |
25+
| installDockerComposeSwitch | Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter. | boolean | false |
2626
| disableIp6tables | Disable ip6tables (this option is only applicable for Docker versions 27 and greater) | boolean | false |
2727

2828
## Customizations

src/docker-in-docker/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "docker-in-docker",
3-
"version": "2.13.0",
3+
"version": "2.14.0",
44
"name": "Docker (Docker-in-Docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
66
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
@@ -53,7 +53,7 @@
5353
},
5454
"installDockerComposeSwitch": {
5555
"type": "boolean",
56-
"default": true,
56+
"default": false,
5757
"description": "Install Compose Switch (provided docker compose is available) which is a replacement to the Compose V1 docker-compose (python) executable. It translates the command line into Compose V2 docker compose then runs the latter."
5858
},
5959
"disableIp6tables": {

src/docker-in-docker/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AZURE_DNS_AUTO_DETECTION="${AZUREDNSAUTODETECTION:-"true"}"
1616
DOCKER_DEFAULT_ADDRESS_POOL="${DOCKERDEFAULTADDRESSPOOL:-""}"
1717
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
1818
INSTALL_DOCKER_BUILDX="${INSTALLDOCKERBUILDX:-"true"}"
19-
INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"true"}"
19+
INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"false"}"
2020
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2121
MICROSOFT_GPG_KEYS_ROLLING_URI="https://packages.microsoft.com/keys/microsoft-rolling.asc"
2222
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal jammy noble"

test/docker-in-docker/docker_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ source dev-container-features-test-lib
99
check "docker-buildx" docker buildx version
1010
check "docker-build" docker build ./
1111

12-
check "installs compose-switch" bash -c "[[ -f /usr/local/bin/compose-switch ]]"
1312
check "docker compose" bash -c "docker compose version | grep -E '2.[0-9]+.[0-9]+'"
1413
check "docker-compose" bash -c "docker-compose --version | grep -E '2.[0-9]+.[0-9]+'"
1514

test/docker-in-docker/docker_buildx.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ check "docker-buildx" docker buildx version
1313
check "docker-build" docker build ./
1414

1515
check "installs docker-compose v1 install" bash -c "type docker-compose"
16-
check "installs compose-switch" bash -c "[[ -f /usr/local/bin/compose-switch ]]"
1716

1817
# Report result
1918
reportResults

test/docker-in-docker/docker_compose_v2.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ source dev-container-features-test-lib
1010
check "docker compose" bash -c "docker compose version | grep -E '2.[0-9]+.[0-9]+'"
1111
check "docker-compose" bash -c "docker-compose --version | grep -E '2.[0-9]+.[0-9]+'"
1212
check "installs compose-switch as docker-compose" bash -c "[[ -f /usr/local/bin/docker-compose ]]"
13-
check "installs compose-switch" bash -c "[[ -f /usr/local/bin/compose-switch ]]"
1413

1514
# Report result
1615
reportResults

test/docker-in-docker/docker_specific_moby_buildx.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ check "docker-buildx" docker buildx version
1414
check "docker-build" docker build ./
1515

1616
check "installs docker-compose v1 install" bash -c "type docker-compose"
17-
check "installs compose-switch" bash -c "[[ -f /usr/local/bin/compose-switch ]]"
1817

1918
# Report result
2019
reportResults

0 commit comments

Comments
 (0)