Skip to content

docker-compose V2 depends on is not working anymore #8910

Closed
compose-spec/compose-go
#281
@Mark-CChen

Description

@Mark-CChen

Description

depends on in docker-compose V2 is not work but worked without V2

Steps to reproduce the issue:
1.create a simple compose file contents

              version: '3.9'
              services:
                web:
                  build: .
                  depends_on:
                    - db
                    - redis
                redis:
                  image: redis
                db:
                  image: postgres

2.remove

                db:
                  image: postgres

3.docker-compose up

Describe the results you received:

nothing

Describe the results you expected:

ERROR: Service 'web' depends on service 'db' which is undefined.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.0.0

Output of docker info:

Docker version v4.1.1

Additional environment details:

Metadata

Metadata

Assignees

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