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] docker stack deploy: depends_on must be a list #9957

Closed
MartenM opened this issue Oct 26, 2022 · 4 comments
Closed

[BUG] docker stack deploy: depends_on must be a list #9957

MartenM opened this issue Oct 26, 2022 · 4 comments

Comments

@MartenM
Copy link

MartenM commented Oct 26, 2022

Description

When attempting the deploy the following stack to docker swarm the depends_on property does not seem to allow for the long format. Specs as seen here

version: "3.9"

services:
  some-app:
    image: hello-world
    depends_on:
      redis:
        condition: service_started
  redis:
    image: redis

Steps To Reproduce

  1. Get the compose configuration from this issue.
  2. Use the following command: docker stack deploy --compose-file docker-compose.yml stacky
  3. Observe the output: services.some-app.depends_on must be a list

Compose Version

Docker Compose version v2.12.0

Docker Environment

Client:
 Context:    merlin-1
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.12.0)
  dev: Docker Dev Environments (Docker Inc., v0.0.3)
  extension: Manages Docker extensions (Docker Inc., v0.2.13)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 15
  Running: 2
  Paused: 0
  Stopped: 13
 Images: 46
 Server Version: 20.10.21
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: oatcbm7nmyy0s1barmlpqfcw5
  Is Manager: true
  ClusterID: 8uq1swbe6k68w5tkxnhbq5ruj
  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: 194.171.203.118
  Manager Addresses:
   194.171.203.118:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1c90a442489720eec95342e1789ee8a5e1b9536f
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.15.0-124-generic
 Operating System: Ubuntu 18.04.5 LTS
 CPUs: 4
 Total Memory: 7.789GiB
 Name: docker-node-marten
 ID: OUUF:6EXL:HIQ6:HERS:CO6T:Z3MJ:LKPT:7Z2Y:NQKS:EQ6Z:ELRG:OLVF
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Anything else?

I am connected to a remote host.

Now if this is not supported in stack deploy that would clear things up, but if that's the case it should print such an error.
Additionally some documentation should be added, because I cannot seem to find anything about it...

Anyway, hope to hear from others :)

@gabrielmocan
Copy link

Following as long syntax looks like not implemented for stack deploy.

@BretFisher
Copy link

Swarm does not currently support the newer Compose Spec. Swarm is on the older 3.9 specification, which doesn't implement depends_on for Swarm. See the note in docs: https://docs.docker.com/compose/compose-file/compose-file-v3/#depends_on

@ndeloof
Copy link
Contributor

ndeloof commented Nov 30, 2022

Please report swarm-related issues to docker/cli, this repository is for docker compose project.

@ndeloof ndeloof closed this as completed Nov 30, 2022
@madrover
Copy link

docker/cli#3880 has been raised but no answer so far...

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

5 participants