소스 검색

Add support for labels during build

Signed-off-by: Colin Hebert <[email protected]>
Colin Hebert 8 년 전
부모
커밋
d906f9ce92
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      compose/config/config_schema_v3.2.json
  2. 1 0
      compose/service.py

+ 1 - 0
compose/config/config_schema_v3.2.json

@@ -72,6 +72,7 @@
                 "context": {"type": "string"},
                 "dockerfile": {"type": "string"},
                 "args": {"$ref": "#/definitions/list_or_dict"},
+                "labels": {"$ref": "#/definitions/list_or_dict"},
                 "cache_from": {"$ref": "#/definitions/list_of_strings"}
               },
               "additionalProperties": false

+ 1 - 0
compose/service.py

@@ -884,6 +884,7 @@ class Service(object):
             nocache=no_cache,
             dockerfile=build_opts.get('dockerfile', None),
             cache_from=build_opts.get('cache_from', None),
+            labels=build_opts.get('labels', None),
             buildargs=build_args
         )