Przeglądaj źródła

Add cache_from to build opts

Signed-off-by: Joey Payne <[email protected]>
Joey Payne 9 lat temu
rodzic
commit
5b6191e653
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 2 1
      compose/config/config_schema_v3.1.json
  2. 1 0
      compose/service.py

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

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

+ 1 - 0
compose/service.py

@@ -802,6 +802,7 @@ class Service(object):
             nocache=no_cache,
             nocache=no_cache,
             dockerfile=build_opts.get('dockerfile', None),
             dockerfile=build_opts.get('dockerfile', None),
             buildargs=build_opts.get('args', None),
             buildargs=build_opts.get('args', None),
+            cache_from=build_opts.get('cache_from', None),
         )
         )
 
 
         try:
         try: