-
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] cycle detected at path with anchors #12247
Comments
Same issue as mentioned in latest comment here |
Thank you for the issue, the fix is ready compose-spec/compose-go#704 |
I'm having a similar bug after updating docker desktop a few hours ago. It's running under docker compose v2.30.0 too. The funny part is I'm only unable to run services with yaml anchors and aliases specifically inside Devcontainers, while using docker-outside-of-docker. Project runs fine on the WSL2 docker host.
Outputs same message for any services using anchors and aliases in its definition. |
@idsulik using 2.30.1 and still having this minimal compose########################### NETWORKS
networks:
default:
driver: bridge
reverse_proxy:
external: false
name: reverse_proxy
ipam:
config:
- subnet: ${REVERSE_PROXY_SUBNET}
gateway: ${REVERSE_PROXY_GATEWAY}
########################### SECRETS
secrets:
############################# VPNS
# Proxy auth
vpn_proxy_username:
file: $SECRETSDIR/vpn_proxy_username
vpn_proxy_password:
file: $SECRETSDIR/vpn_proxy_password
# PIA
vpn_pia_username:
file: $SECRETSDIR/vpn_pia_username
vpn_pia_password:
file: $SECRETSDIR/vpn_pia_password
########################### TEMPLATES
x-templates:
# Gluetun
x-gluetun: &gluetun
container_name: gluetun-template
image: ghcr.io/qdm12/gluetun:v3
restart: unless-stopped
cap_add:
- NET_ADMIN
networks:
reverse_proxy:
environment: &gluetun_env
#### https://github.com/qdm12/gluetun/wiki/Environment-variables
#### System
TZ: "$TZ"
PUID: "$PUID"
PGID: "$PGID"
#### VPN
PUBLICIP_FILE: "/gluetun/ip"
#### DNS over TLS
DOT: "on" # default on
DNS_UPDATE_PERIOD: "0" # default 24h. Period to update block lists and cryptographic files and restart Unbound. Set to 0 to deactivate updates.
BLOCK_MALICIOUS: "on" # default on
BLOCK_SURVEILLANCE: "off" # default off
BLOCK_ADS: "off" # default off
#### HTTP proxy
HTTPPROXY: "on"
HTTPPROXY_LOG: "off" # default off
HTTPPROXY_LISTENING_ADDRESS: ":1080" # default 8888. change to 1080 so curl's default proxy port matches container
# HTTPPROXY_USERNAME: ""
# HTTPPROXY_PASSWORD: ""
HTTPPROXY_USER_SECRETFILE: "/run/secrets/vpn_proxy_username"
HTTPPROXY_PASSWORD_SECRETFILE: "/run/secrets/vpn_proxy_password"
HTTPPROXY_STEALTH: "off" # default off
#### HTTP Control server
HTTP_CONTROL_SERVER_ADDRESS: ":8000" # default :8000
HTTP_CONTROL_SERVER_LOG: "on" # default on
#### Other
# HEALTH_TARGET_ADDRESS: "1.1.1.1" # default cloudflare.com:443
PUBLICIP_PERIOD: "12h" # default 12h. period to check for public IP address. set to 0 to disable.
VERSION_INFORMATION: "off" # default on. Logs a message indicating if a newer version is available once the VPN is connected.
UPDATER_PERIOD: "0" # default 0. Period to update all VPN servers information in memory and to /gluetun/servers.json.
tmpfs:
- /tmp
volumes: &gluetun_volumes
- $CONTDIR/gluetun/servers.json:/gluetun/servers.json
labels: &gluetun_labels
## Deunhealth
deunhealth.restart.on.unhealthy: true
## unRAID
net.unraid.docker.managed: "compose"
net.unraid.docker.icon: $CONTDIR/_unraid-icons/gluetun.png
x-gluetun-pia: &gluetun_pia
<<: *gluetun
secrets:
- vpn_proxy_username
- vpn_proxy_password
- vpn_pia_username
- vpn_pia_password
x-gluetun-env-pia: &gluetun_env_pia
<<: *gluetun_env
#### VPN HOST
VPN_SERVICE_PROVIDER: "private internet access"
OPENVPN_USER_SECRETFILE: "/run/secrets/vpn_pia_username"
OPENVPN_PASSWORD_SECRETFILE: "/run/secrets/vpn_pia_password"
# SERVER_REGIONS: ""
# PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING: "off"
# PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING_STATUS_FILE : "/gluetun/forwarded_port"
########################### SERVICES
services:
########################### VPNS
# PIA
# vp0 - CA Ontario (CA Toronto)
vp0:
<<: *gluetun_pia
container_name: vp0
ports:
- $DOCKERHOSTIP:${VPN_PORT}50:1080
environment:
<<: *gluetun_env_pia
SERVER_REGIONS: "CA Ontario"
VPN_PORT_FORWARDING: "on"
VPN_PORT_FORWARDING_STATUS_FILE: "/gluetun/forwarded_port.dat"
UPDATER_PERIOD: "24h"
UPDATER_VPN_SERVICE_PROVIDERS: "private internet access,windscribe,vpn unlimited"
volumes:
- $CONTDIR/gluetun/vp0:/gluetun
- $CONTDIR/gluetun/servers.json:/gluetun/servers.json
# - <<: *gluetun_volumes
labels:
<<: *gluetun_labels
## Diun
diun.enable: true
diun.watch_repo: true
# diun.notify_on: new
diun.include_tags: ^v\\d+$$ |
@jathek hi! Thank you for the details, pushed fix compose-spec/compose-go#706 |
The error happens again on 2.30.2 works well on 2.30.1 |
@maksym-bobmm could you please provide more details? minimal config content to reproduce |
I'm having the the same error on 2.30.2 using the following minimal compose file: # Fragments
x-common:
&common
restart: unless-stopped
# Services
services:
backend:
<<: *common
image: alpine:latest
backend-static:
<<: *common
image: alpine:latest
backend-worker:
<<: *common
image: alpine:latest Output:
I'm happy to test further things if this helps 👍 |
Hello folks! The version |
pushed fix compose-spec/compose-go#709 @douglas could you please provide your yaml config? I'll check it as well |
@idsulik I can't share our YAML config, but it looks like what @ngandrass posted above 👍 Thank you so much for the quick fix! Can I test it without the final release? |
you can post yaml config with dummy data) replace image names etc. with fake data).
if you have Go locally, then yes, pull the compose' main branch, run |
@idsulik here is the output for
I'm using macOS Sonoma 14.6.1 (23G93). |
Could you try this one? p.s. generally keep in mind, that it's not a good idea to use binary from an unknown person because I can inject anything to the code) |
@idsulik, thanks for providing the binary. No worries; I usually avoid it except for cases like this one 😉 I just tested your binary, and I can confirm it solves the problem 👍 Thanks again for quickly fixing the issue! Really appreciated ❤ |
Hello ! I have same issue :
I can't install unknown binary, company security policy 😅 Is there another work around ? Thanks ! |
@idsulik Cool thanks ! I will wait for the release then, good job =) |
@JulienItard can you check the latest release fixed your issue as expected? |
@douglas you can download the official release with the fix now |
Thanks a lot for the quick fix! ❤ Edit: I can confirm that everything works fine now! |
Now i'm waiting for Homebrew to get it 🫠 |
Hello, I've probably found an edge case. The issue reproduces on main branch with this config: services:
assets: &assets
image: node:20
build:
<<: *assets
command: echo hello from build
build.uk:
<<: *assets
command: echo hello from build.uk ./bin/build/docker-compose version
Docker Compose version v2.30.3-19-g5e3a09538
./bin/build/docker-compose run --rm build.uk
cycle detected: node at path services.build.uk references node at path services.build My guess it is because of the |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [docker/compose](https://github.com/docker/compose) | minor | `v2.29.7` -> `v2.30.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>docker/compose (docker/compose)</summary> ### [`v2.30.3`](https://github.com/docker/compose/releases/tag/v2.30.3) [Compare Source](docker/compose@v2.30.2...v2.30.3) #### What's Changed ##### 🐛 Fixes - Avoid starting all services on rebuild by [@​jhrotko](https://github.com/jhrotko) [(12258)](docker/compose#12258) ##### ⚙️ Dependencies - Bump compose-go v2.4.4 by [@​glours](https://github.com/glours) [(12274)](docker/compose#12274) **Full Changelog**: docker/compose@v2.30.2...v2.30.3 ### [`v2.30.2`](https://github.com/docker/compose/releases/tag/v2.30.2) [Compare Source](docker/compose@v2.30.1...v2.30.2) #### What's Changed ##### 🐛 Fixes - Service being declared in a profile must not trigger re-creation by [@​ndeloof](https://github.com/ndeloof) in [(12265)](docker/compose#12265) - Remove ArtifactType from Config in OCI v1.1 definition of the artifact by [@​glours](https://github.com/glours) [(12266)](docker/compose#12266) ##### 🔧 Internal - Add Joana Hrotko to Maintainers by [@​laurazard](https://github.com/laurazard) [(12253)](docker/compose#12253) - Add profile e2e test case to document in compose by [@​jhrotko](https://github.com/jhrotko) [(12252)](docker/compose#12252) ##### ⚙️ Dependencies - Bump `compose-go` to version `v2.4.3` by [@​glours](https://github.com/glours) in docker/compose#12261 **Full Changelog**: docker/compose@v2.30.1...v2.30.2 ### [`v2.30.1`](https://github.com/docker/compose/releases/tag/v2.30.1) [Compare Source](docker/compose@v2.30.0...v2.30.1) #### What's Changed ##### 🐛 Fixes Fix regression when using stdin as input of `-f` flag [(12248)](docker/compose#12248) Fix regression when using multiple time the same YAML anchor in a Compose file [(12247)](docker/compose#12247) ##### ⚙️ Dependencies - bump compose-go to version v2.4.2 by [@​glours](https://github.com/glours) in docker/compose#12249 **Full Changelog**: docker/compose@v2.30.0...v2.30.1 ### [`v2.30.0`](https://github.com/docker/compose/releases/tag/v2.30.0) [Compare Source](docker/compose@v2.29.7...v2.30.0) #### What's Changed ##### ✨ Improvements - Introduce service hooks by [@​ndeloof](https://github.com/ndeloof) [(12166)](docker/compose#12166) - Introduce generate command as alpha command by [@​glours](https://github.com/glours) [(12209)](docker/compose#12209) - Add export command by [@​jarqvi](https://github.com/jarqvi) [(12120)](docker/compose#12120) - Add support for CDI device request using `devices` by [@​ndeloof](https://github.com/ndeloof) [(12184)](docker/compose#12184) - Add support for bind recursive by [@​ndeloof](https://github.com/ndeloof) [(12210)](docker/compose#12210) - Allow usage of `-f` flag with OCI Compose artifacts by [@​glours](https://github.com/glours) [(12220)](docker/compose#12220) ##### 🐛 Fixes - Append unix-style relative path when computing container target path by [@​ndeloof](https://github.com/ndeloof) [(12145)](docker/compose#12145) - Wait for dependent service up to delay set by --wait-timeout by [@​ndeloof](https://github.com/ndeloof) [(12156)](docker/compose#12156) - Check secret source exists, as bind mount would create target by [@​ndeloof](https://github.com/ndeloof) [(12151)](docker/compose#12151) - After container restart register printer consumer by [@​jhrotko](https://github.com/jhrotko) [(12158)](docker/compose#12158) - Fix(down): Fix down command if specified services are not running by [@​idsulik](https://github.com/idsulik) [(12164)](docker/compose#12164) - Show watch error message and open DD only when w is pressed by [@​jhrotko](https://github.com/jhrotko) [(12165)](docker/compose#12165) - Fix(push): Fix unexpected EOF on alpha publish by [@​idsulik](https://github.com/idsulik) [(12169)](docker/compose#12169) - Fix(convergence): Serialize access to observed state by [@​anantadwi13](https://github.com/anantadwi13) [(12150)](docker/compose#12150) - Remove feature flag integration with Docker Desktop for ComposeUI and ComposeNav by [@​jhrotko](https://github.com/jhrotko) [(12192)](docker/compose#12192) - Support Dockerfile-specific ignore-file with watch by [@​ndeloof](https://github.com/ndeloof) [(12193)](docker/compose#12193) - Add support for raw env_file format by [@​ndeloof](https://github.com/ndeloof) [(12179)](docker/compose#12179) - Convert GPUs to DeviceRequests with implicit "gpu" capability by [@​ndeloof](https://github.com/ndeloof) [(12197)](docker/compose#12197) - Improve error message to include expected network label by [@​divinity76](https://github.com/divinity76) [(12213)](docker/compose#12213) - Don't use progress to render restart, which hides logs by [@​ndeloof](https://github.com/ndeloof) [(12226)](docker/compose#12226) - One-off containers are not indexed, and must be ignored by `exec --index` command by [@​ndeloof](https://github.com/ndeloof) [(12224)](docker/compose#12224) - Don't warn about uid/gid not being supported while ... they are by [@​ndeloof](https://github.com/ndeloof) [(12232)](docker/compose#12232) - Connect to external networks by name by [@​ndeloof](https://github.com/ndeloof) [(12234)](docker/compose#12234) - Fix push error message typo by [@​chris-crone](https://github.com/chris-crone) [(12237)](docker/compose#12237) - Fix(dockerignore): Add wildcard support to dockerignore.go by [@​idsulik](https://github.com/idsulik) [(12239)](docker/compose#12239) ##### 🔧 Internal - Remove bind options when creating a volume type by [@​jhrotko](https://github.com/jhrotko) [(12177)](docker/compose#12177) - pass device.options to engine by [@​ndeloof](https://github.com/ndeloof) [(12183)](docker/compose#12183) - Add security policy by [@​thaJeztah](https://github.com/thaJeztah) [(12194)](docker/compose#12194) - Gha: set default permissions to "contents: read" by [@​thaJeztah](https://github.com/thaJeztah) [(12195)](docker/compose#12195) - Desktop: allow this client to be identified via user-agent by [@​djs55](https://github.com/djs55) [(12212)](docker/compose#12212) - Compose-go clean volume target to avoid ambiguous comparisons by [@​ndeloof](https://github.com/ndeloof) [(12208)](docker/compose#12208) ##### ⚙️ Dependencies - Bump docker `v27.3.1` by [@​ndeloof](https://github.com/ndeloof) [(12178)](docker/compose#12178) - Build(deps): bump `golang.org/x/sys` from `0.25.0` to `0.26.0` by [@​dependabot](https://github.com/dependabot) [(12189)](docker/compose#12189) - Bump `compose-go` to `v2.3.0` by [@​glours](https://github.com/glours) [(12198)](docker/compose#12198) - Bump `compose-go` to `v2.4.0` by [@​glours](https://github.com/glours) [(12231)](docker/compose#12231) - Bump `compose-go` to `v2.4.1` by [@​glours](https://github.com/glours) [(12243)](docker/compose#12242) - Build(deps): bump github.com/containerd/containerd from 1.7.22 to 1.7.23 by [@​dependabot](https://github.com/dependabot) [(12211)](docker/compose#12211) - Bump golang minimal version to `1.22` in go.mod by [@​glours](https://github.com/glours) [(12246)](docker/compose#12246) - Bump `go.uber.org/mock` to `v0.5.0` and `google.golang.org/grpc` to `v1.67.1` by [@​glours](https://github.com/glours) [(12245)](docker/compose#12245) #### New Contributors - [@​anantadwi13](https://github.com/anantadwi13) made their first contribution in docker/compose#12150 - [@​jarqvi](https://github.com/jarqvi) made their first contribution in docker/compose#12120 - [@​djs55](https://github.com/djs55) made their first contribution in docker/compose#12212 - [@​divinity76](https://github.com/divinity76) made their first contribution in docker/compose#12213 **Full Changelog**: docker/compose@v2.29.7...v2.30.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
I need an older docker compose version as the current version from 24.11 lets me run into the 'cycle detected at path' error [1]. [1] See docker/compose#12247
For others coming along: |
Description
docker compose up -d
returns:This worked before 2.30.0
Steps To Reproduce
this is my
docker-compose.yml
:Compose Version
v2.30.0
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.30.0
Path: /usr/local/lib/docker/cli-plugins/docker-compose
Server:
Containers: 41
Running: 41
Paused: 0
Stopped: 0
Images: 65
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: active
NodeID: mzspegqexo7ka7bwccebn09on
Is Manager: true
ClusterID: 2qn2wroe2sinvydtudxjesbk7
Managers: 3
Nodes: 5
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 192.168.1.132
Manager Addresses:
192.168.1.103:2377
192.168.1.132:2377
192.168.1.140:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.11.0-9-generic
Operating System: Ubuntu 24.10
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 30.69GiB
Name: nuc
ID: 5ddf237a-7f91-4942-8702-6ce95a3666d7
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response
The text was updated successfully, but these errors were encountered: