Docker Community Forums

Share and learn in the Docker community.

Depends_on version 3


(Dockerob) #1

Hi,

Docker version: 1.13.1
Compose Version: 1.11.2
Platform: mac

Looking to use the depends_on functionality to refer to a healthcheck in another service e.g.

depends_on:
  config-service-v1:
    condition: service_healthy

If I set the compose file version to “3” I get “.depends_on contains an invalid type, it should be an array” if I set the version back to “2.1” it works. Is version 3 not backward compatible or has the depends_on syntax changed for version 3?

I also tried specifying the depends_on as an array e.g.

depends_on:
  - config-service-v1:
      condition: service_healthy

This resulted in a different error.

Kind regards,
Rob.


#2

“No longer supports the condition”