为服务指定标签。这些标签只会为服务设置,而不会为运行服务的容器设置标签。
version: "3.9" services: web: image: web deploy: labels: com.example.description: "This label will appear on the web service"
如果要为容器设置标签,可以在deploy的外部使用labels键来设置:
version: "3.9" services: web: image: web labels: com.example.description: "This label will appear on all containers for the web service"
Last updated 3 years ago