Skip to content

docker-in-docker installs Compose on Debian when dockerDashComposeVersion is none #1743

Description

@lusoris

Summary

docker-in-docker 4.1.1 ignores "dockerDashComposeVersion": "none" on Debian-based images when moby=true. The installer unconditionally installs moby-compose, so consumers cannot omit Compose as the feature schema promises.

Reproduction

Using the frozen feature digest sha256:2b44bcb32e75d5a3c028479f7f957cf7d5e42d81761373025a8d501dd3748f88:

{
  "ghcr.io/devcontainers/features/docker-in-docker:4": {
    "version": "29.8.1",
    "moby": true,
    "mobyBuildxVersion": "0.37.1",
    "dockerDashComposeVersion": "none"
  }
}

The build log confirms DOCKERDASHCOMPOSEVERSION="none", but the resulting image contains:

$ dpkg -S /usr/libexec/docker/cli-plugins/docker-compose
moby-compose: /usr/libexec/docker/cli-plugins/docker-compose
$ docker compose version
Docker Compose version 5.5.1-1

The APT history records apt-get -y install --no-install-recommends moby-compose.

Root cause

In src/docker-in-docker/install.sh, the Debian/Moby engine-install branch unconditionally executes:

apt-get -y install --no-install-recommends moby-compose

The RHEL branch immediately below correctly guards the equivalent install with DOCKER_DASH_COMPOSE_VERSION != none.

The Debian/Docker CE branch also appears to install docker-compose-plugin unconditionally.

Expected behavior

Guard both Debian Compose package installs with the same none check used by the RHEL branch, and add Debian tests that assert both the standalone binary and CLI plugin are absent when the option is none.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions