-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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] "docker-compose config" consumes huge amounts of memory with broken config #12235
Comments
@ahollmann Hi! I think the reason is the recursive alias. the |
@idsulik Thanks. This seems to be the case. Thanks for creating the MR. |
This fix broke references for services that are prefixed with the name of a preceding service. docker-compose.yaml services:
a: &a
image: alpine
a2: *a $ dc config
cycle detected at path: services.a2 Switch the order and see that since the docker-compose.yaml services:
a2: &a
image: alpine
a: *a $ dc config
...
services:
a:
image: alpine
networks:
default: null
a2:
image: alpine
networks:
default: null
... The fix I believe would be to check the visited path plus a dot, so that at |
@caseywebdev thank you for the details! pushed fix for it compose-spec/compose-go#704 |
Description
docker-compose config with the following config consumes huge amounts of memory. I had to SIGTERM it with ctrl-c in order not to run out of memory.
The config is obviously broken as
services:
is missing.I'm using
docker-compose config
to verify if the config is correct so it seems to be valid use case.Version used: Docker Compose version v2.29.7
Steps To Reproduce
Create compose.yaml with the input
run: docker-compose config
Compose Version
Docker Compose version v2.29.7
Docker Environment
Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.7
Path: /usr/libexec/docker/cli-plugins/docker-compose
Anything else?
No response
The text was updated successfully, but these errors were encountered: