Skip to content

docker-compose 1.27.3 config depends_on breaks stack deploy #7773

@dfresh613

Description

@dfresh613

Description of the issue

When we apply docker-compose config to a docker-compose file with depends_on, the end result is not deployable by docker stack..

Steps to reproduce the issue

Example docker-compose file:

services:
  test:
    depends_on:
    - test2
    image: a/fakeimage:latest
  test2:
    image: a/fakeimage:latest
version: '3.4'

Use docker-compose -f <example-config> config > new_config

The result is:

services:
  test:
    depends_on:
      test2:
        condition: service_started
    image: a/fakeimage:latest
  test2:
    image: a/fakeimage:latest
version: '3.4'

Now, attempting to deploy that new compose config, docker stack deploy fails:

docker stack deploy -c configout.yml iservices
services.test.depends_on must be a list

This behavior does not occur in 1.26.x or 1.27.2

docker-ce == 19.03.5
docker-compose ==1.27.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions