You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docker Compose started failing recently on Circular reference error. It happens when I extended a service from another compose file which contains more service definitions (even those I am not suing in the specific place) and the new file states dependencies among services.
Run docker compose create
Example error I would get
Circular reference:
b in docker-compose.yml
extends a in docker-compose-base.yml
extends c in docker-compose-base.yml
extends a in docker-compose.yml
extends c in docker-compose-base.yml
Compose Version
2.24.0
Docker Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Has anyone come up with a workaround (other than downgrading to 2.23)? Our CI is based on creating a compose config for our Docker Swarm by running docker compose -f ${DOCKER_COMPOSE_FILE} config --no-interpolate --output /tmp/docker-compose.swarm.yml which causes the same error as documented above.
there's no workaround, a bug-fix release will come soon
Our CI is based on creating a compose config for our Docker Swarm
Why not just let docker stack parse your compose file ? Please note Swarm is not compliant with the compose specification, so combining compose and swarm can bring troubles
Why not just let docker stack parse your compose file ? Please note Swarm is not compliant with the compose specification, so combining compose and swarm can bring troubles
Exactly as you say: docker stack does not support the full syntax, but with docker compose config we generate a compose file that contains a file with the parts of the syntax we need (we only need the extends syntax to remove duplication in our config files).
right, docker stack indeed doesn't support extends :'(
anyway, compose config output might not be compatible with it as the file format evolves, and we won't maintain a second compose parser. See docker/cli#2527
Description
Docker Compose started failing recently on
Circular reference
error. It happens when I extended a service from another compose file which contains more service definitions (even those I am not suing in the specific place) and the new file states dependencies among services.Steps To Reproduce
docker-compose-base.yml
docker-compose.yml
docker compose create
Example error I would get
Compose Version
Docker Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: