edit-icon download-icon

Label overview

Last Updated: Feb 12, 2018

Swarm mode clusters support Compose V1/V2 and Compose V3 orchestration templates. However, the support for Alibaba Cloud Container Service extension labels differs between Compose V1/V2 and Compose V3 orchestration templates.

Function Compose V1/V2 Compose V3
Service health check The aliyun.probe label. healthcheck in Compose. This is a native function of Docker Engine.
Rolling update The aliyun.rolling_updates label.
The aliyun.rolling_updates.parallelism label.
update_config in Compose. This is a native function of swarm mode. You can configure the number of containers updated in a batch, the update interval, and the action upon failure.
Service dependency The aliyun.depends label. depends_on in Compose. Services are started in sequence of dependency. The default waiting time is 3 minutes. If a service is not running after 3 minutes, the system will ignore this service and continue to deploy other services, but the final deployment result is failure.
Number of containers in a service The aliyun.scale label. replicas in Compose. This function is equivalent to the Replicated Service of swarm mode. When a container malfunctions, a new container will be automatically created to make sure that replicas is equal to the specified number.
Global service The aliyun.global label. mode in Compose. This function is equivalent to the Global Service in swarm mode. When a node is added to the cluster, the corresponding container will be automatically created on that node.
Server Load Balancer The labels aliyun.routing and aliyun.lb. See Routing and Server Load Balancer.
Log The aliyun.log label. The same with that of Compose V1/V2. See the log label.
Data volume volumes in Compose. The usage is the same with that of Compose V1/V2. When a local data volume is used but the host folder does not exist, you must create the folder manually.
Monitoring and auto scaling The labels aliyun.auto_scaling and aliyun.reschedule. The same with that of Compose V1/V2.
External service external_links in Compose. Not supported.
Container rescheduling The environment variable reschedule:on-node-failure. The replicated service can guarantee the automatic migration of containers. No additional settings are required.
High availability scheduling The environment variable availability:az. Not supported.
Thank you! We've received your feedback.