From 0a862f244f67023b5f748c0d9a0934d6cb1c651b Mon Sep 17 00:00:00 2001 From: sireeshajonnalagadda Date: Mon, 22 Sep 2025 09:06:05 +0000 Subject: [PATCH] Disable Moby usage for Debian 'trixie' codename to ensure compatibility --- src/docker-in-docker/install.sh | 7 +++---- .../debian_trixie_with_moby.sh | 12 ++++++++++++ .../debian_trixie_without_moby.sh | 12 ++++++++++++ test/docker-in-docker/scenarios.json | 18 +++++++++++++++++- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 test/docker-in-docker/debian_trixie_with_moby.sh create mode 100644 test/docker-in-docker/debian_trixie_without_moby.sh diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index 46f1045ae..c38dae630 100755 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh @@ -195,11 +195,10 @@ export DEBIAN_FRONTEND=noninteractive # Fetch host/container arch. architecture="$(dpkg --print-architecture)" -# Prevent attempting to install Moby on Debian trixie (packages removed) +# Handle moby option for Debian trixie if [ "${USE_MOBY}" = "true" ] && [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; then - err "The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution." - err "To continue, either set the feature option '\"moby\": false' or use a different base image (for example: 'debian:bookworm' or 'ubuntu-24.04')." - exit 1 + echo "The 'moby' option is not supported on Debian 'trixie', hence setting moby to false" + USE_MOBY="false" fi # Check if distro is supported diff --git a/test/docker-in-docker/debian_trixie_with_moby.sh b/test/docker-in-docker/debian_trixie_with_moby.sh new file mode 100644 index 000000000..950a3779a --- /dev/null +++ b/test/docker-in-docker/debian_trixie_with_moby.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "docker installed" bash -c "type docker" + +# Report results +reportResults \ No newline at end of file diff --git a/test/docker-in-docker/debian_trixie_without_moby.sh b/test/docker-in-docker/debian_trixie_without_moby.sh new file mode 100644 index 000000000..c6c679684 --- /dev/null +++ b/test/docker-in-docker/debian_trixie_without_moby.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "docker installed" bash -c "type docker" + +# Report results +reportResults diff --git a/test/docker-in-docker/scenarios.json b/test/docker-in-docker/scenarios.json index 3b5dce013..e7a30eb3d 100644 --- a/test/docker-in-docker/scenarios.json +++ b/test/docker-in-docker/scenarios.json @@ -177,5 +177,21 @@ }, "remoteUser": "vscode", "onCreateCommand": "docker ps && sleep 5s && docker ps" + }, + "debian_trixie_without_moby": { + "image": "mcr.microsoft.com/devcontainers/base:trixie", + "features": { + "docker-in-docker": { + "moby": false + } + } + }, + "debian_trixie_with_moby": { + "image": "mcr.microsoft.com/devcontainers/base:trixie", + "features": { + "docker-in-docker": { + "moby": true + } + } } -} +} \ No newline at end of file