#14269·compose

[BUG] dry-run up waits indefinitely for service_completed_successfully dependency

Author: timafenCreated Sep 28, 2026Updated Sep 28, 2026
Labelskind/bug

Description

docker compose --dry-run up -d does not finish when a service depends on a one-shot service with condition: service_completed_successfully. Reproduced with Compose v5.5.1 and v5.4.0. Changing only the condition to service_started makes the same dry-run exit 0.

Expected: dry-run should simulate successful completion of the one-shot dependency and finish without creating resources. Observed: the minimal case reaches an external 15-second timeout. In a larger configuration the same dependency waited until external 120/180-second timeouts. No containers were actually created.

Steps To Reproduce

Save this as compose.yaml:

yaml
services:
  init:
    image: postgres:17.11
    command: ["true"]
  app:
    image: postgres:17.11
    command: ["true"]
    depends_on:
      init:
        condition: service_completed_successfully

Run only the simulation:

bash
timeout 15s docker compose --dry-run -p compose-dryrun-repro -f compose.yaml up -d
echo "$?"
docker ps -aq --filter label=com.docker.compose.project=compose-dryrun-repro

The timeout returns 124; the container list is empty. Change only service_completed_successfully to service_started and repeat: rc0, still no containers.

Compose Version

Reproduced separately on:

  • Docker Compose v5.5.1 (docker-compose-plugin 5.5.1-1ubuntu.24.04noble)
  • Docker Compose v5.4.0 (docker-compose-plugin 5.4.0-1ubuntu.24.04noble)

Docker Environment

Ubuntu 24.04, Linux amd64, Docker Engine 29.8.1. These are ordinary docker compose commands, not a Swarm stack deployment.

Anything else?

--dry-run up -d --no-start exits 0 for the larger configuration, but it does not validate the simulated dependency completion/start sequence. We have kept the real dependency unchanged. All reproductions above use dry-run; there is no result claimed for a real deployment of this minimal example.