Skip to content

[BUG] docker compose up -d wait incorrectly returning 1 when all services/jobs reported healthy #13069

@jamesmcguirepro

Description

@jamesmcguirepro

Description

  1. Set up a docker-compose.yml file that runs several jobs and services.
  2. Run docker compose up -d wait
  3. Have all jobs succeed, and all services come up healthy
  4. Observe return code is incorrectly set to 1
jamesmcguire@MAC-2FHKQ7X compose % docker compose up -d --wait
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "PORT" variable is not set. Defaulting to a blank string. 
WARN[0000] The "AWS_SESSION_TOKEN" variable is not set. Defaulting to a blank string. 
WARN[0000] The "BINDER_URL_SIGNING_SECRET" variable is not set. Defaulting to a blank string. 
WARN[0000] The "NEO4J_HOST_FULL_URL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_PRIVATE_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_PRIVATE_KEY_PASSPHRASE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_ROLE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_USER" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_DATABASE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "DLM_SNOWFLAKE_SCHEMA" variable is not set. Defaulting to a blank string. 
WARN[0000] The "POSTGRES_HOST" variable is not set. Defaulting to a blank string. 
WARN[0000] The "AWS_SESSION_TOKEN" variable is not set. Defaulting to a blank string. 
WARN[0000] The "BINDER_URL_SIGNING_SECRET" variable is not set. Defaulting to a blank string. 
[+] Running 22/24
 ✔ Network compose_default                                   Created                                                                                                                                                                                                                                          0.0s 
 ✔ Container compose-zookeeper-1                             Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-ui-service-shell-proxy-1                Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-redis-1                                 Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-postgres-1                              Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-elasticsearch-1                         Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-mailcatcher-1                           Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-dynamodb-1                              Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-memcached-1                             Healthy                                                                                                                                                                                                                                        112.7s 
 ✔ Container compose-dynamodb-admin-1                        Healthy                                                                                                                                                                                                                                        112.6s 
 ✔ Container compose-ui-service-shell-1                      Healthy                                                                                                                                                                                                                                        112.6s 
 ✔ Container compose-kafka-1                                 Healthy                                                                                                                                                                                                                                        112.6s 
 ⠼ Container compose-image-processing-1                      Waiting                                                                                                                                                                                                                                        112.6s 
 ✔ Container compose-image-processing-sidekiq-1              Healthy                                                                                                                                                                                                                                        112.6s 
 ✔ Container compose-kafka-ui-1                              Healthy                                                                                                                                                                                                                                        112.5s 
 ✔ Container compose-streaming-topic-management-1            Exited                                                                                                                                                                                                                                         112.5s 
 ✔ Container compose-schema-registry-1                       Healthy                                                                                                                                                                                                                                        112.5s 
 ⠧ Container compose-types-registrar-1                       Waiting                                                                                                                                                                                                                                        112.5s 
 ✔ Container compose-kafka-connect-1                         Healthy                                                                                                                                                                                                                                        112.5s 
 ✔ Container compose-connectable-event-router-jobmanager-1   Healthy                                                                                                                                                                                                                                        112.5s 
 ✔ Container compose-connectable-event-router-taskmanager-1  Healthy                                                                                                                                                                                                                                        112.4s 
 ✔ Container compose-kafka-connect-deployer-1                Exited                                                                                                                                                                                                                                         112.3s 
 ✔ Container compose-flink-router-jobmanager-1               Healthy                                                                                                                                                                                                                                        112.3s 
 ✔ Container compose-flink-router-taskmanager-1              Healthy                                                                                                                                                                                                                                        112.2s 
container compose-types-registrar-1 exited (0)
jamesmcguire@MAC-2FHKQ7X compose % echo $?
1

Steps To Reproduce

No response

Compose Version

% docker compose version     
Docker Compose version v2.38.2-desktop.1

Docker Environment

% docker version             
Client:
 Version:           27.5.1-rd
 API version:       1.47
 Go version:        go1.22.11
 Git commit:        0c97515
 Built:             Thu Jan 23 18:12:38 2025
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.43.2 (199162)
 Engine:
  Version:          28.3.2
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.5
  Git commit:       e77ff99
  Built:            Wed Jul  9 16:13:56 2025
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions