Skip to content

Commit 0a862f2

Browse files
Disable Moby usage for Debian 'trixie' codename to ensure compatibility
1 parent eea561a commit 0a862f2

File tree

4 files changed

+44
-5
lines changed

4 files changed

+44
-5
lines changed

src/docker-in-docker/install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,10 @@ export DEBIAN_FRONTEND=noninteractive
195195
# Fetch host/container arch.
196196
architecture="$(dpkg --print-architecture)"
197197

198-
# Prevent attempting to install Moby on Debian trixie (packages removed)
198+
# Handle moby option for Debian trixie
199199
if [ "${USE_MOBY}" = "true" ] && [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; then
200-
err "The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution."
201-
err "To continue, either set the feature option '\"moby\": false' or use a different base image (for example: 'debian:bookworm' or 'ubuntu-24.04')."
202-
exit 1
200+
echo "The 'moby' option is not supported on Debian 'trixie', hence setting moby to false"
201+
USE_MOBY="false"
203202
fi
204203

205204
# Check if distro is supported
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "docker installed" bash -c "type docker"
10+
11+
# Report results
12+
reportResults
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "docker installed" bash -c "type docker"
10+
11+
# Report results
12+
reportResults

test/docker-in-docker/scenarios.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,21 @@
177177
},
178178
"remoteUser": "vscode",
179179
"onCreateCommand": "docker ps && sleep 5s && docker ps"
180+
},
181+
"debian_trixie_without_moby": {
182+
"image": "mcr.microsoft.com/devcontainers/base:trixie",
183+
"features": {
184+
"docker-in-docker": {
185+
"moby": false
186+
}
187+
}
188+
},
189+
"debian_trixie_with_moby": {
190+
"image": "mcr.microsoft.com/devcontainers/base:trixie",
191+
"features": {
192+
"docker-in-docker": {
193+
"moby": true
194+
}
195+
}
180196
}
181-
}
197+
}

0 commit comments

Comments
 (0)