edit-icon download-icon

depends

Last Updated: Nov 14, 2017

Set the dependencies of a service.

After setting the dependencies of a service, Container Service can control the start sequence of containers, starting the containers one by one.

Example:

Note: Separate dependencies by using a comma (,).

  1. web:
  2. image: wordpress:4.2
  3. ports:
  4. - 80
  5. links:
  6. - db:mysql
  7. labels:
  8. aliyun.depends: db,redis
  9. db:
  10. image: mysql
  11. environment:
  12. - MYSQL_ROOT_PASSWORD=password
  13. redis:
  14. image: redis
Thank you! We've received your feedback.