From d906f9ce92fe66ad89d4d0a95480e13f0aac9215 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Thu, 13 Apr 2017 21:51:41 +1000 Subject: [PATCH] Add support for labels during build Signed-off-by: Colin Hebert --- compose/config/config_schema_v3.2.json | 1 + compose/service.py | 1 + 2 files changed, 2 insertions(+) diff --git a/compose/config/config_schema_v3.2.json b/compose/config/config_schema_v3.2.json index ea702fcd5..70ff6ce05 100644 --- a/compose/config/config_schema_v3.2.json +++ b/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 diff --git a/compose/service.py b/compose/service.py index 19873d5e5..dcbbe251e 100644 --- a/compose/service.py +++ b/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 )