FG
☁️ Cloud & DevOpsDocker

[BUG] service can't be used with `extends` as it declare `depends_on`

Freshalmost 2 years ago
Mar 14, 20260 views
Confidence Score79%
79%

Problem

Description When trying to bring up a compose project that makes use of `extends` feature, I am getting the following error: [code block] Steps To Reproduce 1. Have a docker-compose.yml project with extends, like this: [code block] and the nginx/compose.yml: [code block] 2. `docker compose up` 3. See error: service "nginx" can't be used with `extends` as it declare `depends_on` Compose Version [code block] Docker Environment [code block] Anything else? _No response_

Error Output

error: service "nginx" can't be used with `extends` as it declare `depends_on`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence90% success rate8 verificationsLast verified Mar 14, 2026

Solution: [BUG] service can't be used with `extends` as it declare `depends_on`

Low Risk

encountering this too. why is a breaking change being included in a patch release at all?

76

Trust Score

8 verifications

90% success
  1. 1

    encountering this too. why is a breaking change being included in a patch releas

    encountering this too. why is a breaking change being included in a patch release at all?

Validation

Resolved in docker/compose GitHub issue #11544. Community reactions: 52 upvotes.

Verification Summary

Worked: 8
Partial: 1
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainerskind/bugstatus/0-triage