Skip to content

Commit c31723d

Browse files
[docker-in-docker] - issue #1202 solution - moby=false, holds configured docker-ce and docker-ce-cli version (#1215)
* [docker-in-docker] - issue #1202 solution - moby=false, holds configured docker-ce and docker-ce-cli version * test case for scenario of issue --------- Co-authored-by: Daniel Doyle <[email protected]>
1 parent 28b75a6 commit c31723d

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/docker-in-docker/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ else
312312
else
313313
apt-get -y install --no-install-recommends docker-ce-cli${cli_version_suffix} docker-ce${engine_version_suffix}
314314
# Install compose
315+
apt-mark hold docker-ce docker-ce-cli
315316
apt-get -y install --no-install-recommends docker-compose-plugin || echo "(*) Package docker-compose-plugin (Docker Compose v2) not available for OS ${ID} ${VERSION_CODENAME} (${architecture}). Skipping."
316317
fi
317318
fi
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Optional: Import test library
4+
source dev-container-features-test-lib
5+
6+
check "docker-ce" bash -c "docker --version"
7+
check "docker-ce-cli" bash -c "docker version"
8+
9+
#report result
10+
reportResults

test/docker-in-docker/scenarios.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@
142142
}
143143
}
144144
},
145+
"pin_docker-ce_version_moby_false": {
146+
"image": "mcr.microsoft.com/devcontainers/base:debian",
147+
"features": {
148+
"docker-in-docker": {
149+
"version": "26.1.4",
150+
"moby": "false",
151+
"mobyBuildxVersion": "latest",
152+
"dockerDashComposeVersion": "none",
153+
"azureDnsAutoDetection": "true",
154+
"dockerDefaultAddressPool": "",
155+
"installDockerBuildx": "true",
156+
"installDockerComposeSwitch": "true",
157+
"disableIp6tables": "false"
158+
}
159+
}
160+
},
145161
// DO NOT REMOVE: This scenario is used by the docker-in-docker-stress-test workflow
146162
"docker_with_on_create_command": {
147163
"image": "mcr.microsoft.com/devcontainers/base:debian",

0 commit comments

Comments
 (0)