Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] config should not keep extends in output YAML #10305

Closed
Vanav opened this issue Feb 22, 2023 · 3 comments
Closed

[BUG] config should not keep extends in output YAML #10305

Vanav opened this issue Feb 22, 2023 · 3 comments

Comments

@Vanav
Copy link

Vanav commented Feb 22, 2023

Description

docker compose config follows extends and resolves them, but also keeps extends in resulting file, This looks like a bug, because extends are already expanded and are useless in resulting file.

Also, this breaks the Docker Swarm use case (moby/moby#31101):

# docker compose config > swarm.yml
# docker stack deploy -c swarm.yml

Compose file contains unsupported options:

extends: Support for `extends` is not implemented yet.

This will work correctly in Compose v1, because it doesn't have this bug and in swarm.yml there will be no extends.

Steps To Reproduce

No response

Compose Version

Docker Compose version v2.16.0

Docker Environment

Docker v23.0.1

Anything else?

No response

@glours
Copy link
Contributor

glours commented Feb 22, 2023

Hello @Vanav

This is a swarm related bug which doesn't follow the Compose Specification and doesn't support the extends attribute
Please report swarm-related issues to docker/cli repository.

@glours glours closed this as completed Feb 22, 2023
@Vanav
Copy link
Author

Vanav commented Feb 22, 2023

Yes, it doesn't support extends. Good way to remove extends was to use docker compose config, and it works on v1. Why v2 keeps extends in output, after files are already included?

@Vanav
Copy link
Author

Vanav commented Feb 26, 2023

For example, docker compose config doesn't leave env_file in resulting file, because it loads variables to config file. So, it shouldn't leave extends in resulting file too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants