Skip to content

cli/compose: honor service profiles on stack deploy - #7300

Open
locker95 wants to merge 2 commits into
docker:masterfrom
locker95:fix/stack-profiles
Open

cli/compose: honor service profiles on stack deploy#7300
locker95 wants to merge 2 commits into
docker:masterfrom
locker95:fix/stack-profiles

Conversation

@locker95

Copy link
Copy Markdown
Contributor

docker stack config currently dies on profiles: with Additional property profiles is not allowed.

This accepts the field and only brings those services in when --profile or COMPOSE_PROFILES is set, same idea as compose.

Fixes #4721
Fixes #3178

stack config currently rejects profiles as an additional property.
parse the field and only enable those services when --profile or
COMPOSE_PROFILES is set.

Fixes docker#4721
Fixes docker#3178

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95
locker95 requested review from a team and silvin-lubecki as code owners September 12, 2026 20:50
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.26087% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/compose/loader/loader.go 84.21% 3 Missing and 3 partials ⚠️
cli/command/stack/loader.go 0.00% 3 Missing ⚠️
cli/command/stack/config.go 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Signed-off-by: Dean Chen <862469039@qq.com>
@locker95
locker95 requested a review from thaJeztah as a code owner September 13, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compose file profiles throw error in stack configs Profile specification for docker stack deploy

2 participants