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] Can not depends_on containers that start with x- #12171

Closed
bspot opened this issue Sep 29, 2024 · 0 comments · Fixed by compose-spec/compose-go#687
Closed

[BUG] Can not depends_on containers that start with x- #12171

bspot opened this issue Sep 29, 2024 · 0 comments · Fixed by compose-spec/compose-go#687
Assignees
Labels

Comments

@bspot
Copy link

bspot commented Sep 29, 2024

Description

When a depends_on contains a container whose name starts with x-, docker compose will fail complaining that the depended on service does not exist.

Steps To Reproduce

services:
    x-foo:
        image: "bash"
        command: "sleep 60"
    bar:
        image: "bash"
        command: "sleep 60"
        depends_on:
          - "x-foo"

Output of docker compose up:

service "bar" depends on undefined service "#extensions": invalid compose project

The same happens when using the long form of depends_on.

Compose Version

Docker Compose version v2.29.7

Same happens with

Docker Compose version v2.28.1

Docker Environment

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 14
  Running: 14
  Paused: 0
  Stopped: 0
 Images: 126
 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: jsm6bxts3k05x0xelkc5k17ov
  Is Manager: true
  ClusterID: uaci6jvh4qlw9y3qedpv7twbu
  Managers: 1
  Nodes: 1
  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: 10.10.1.2
  Manager Addresses:
   10.10.1.2: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: 5.10.0-16-amd64
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: x86_64
 CPUs: 3
 Total Memory: 3.745GiB
 Name: delta-1
 ID: a784c1a8-3135-4649-91a5-d65681f05f3b
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

I assume that has something to do with extension properties?

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

Successfully merging a pull request may close this issue.

2 participants