mirror of
https://github.com/docker/compose.git
synced 2025-07-25 14:44:29 +02:00
Merge pull request #6624 from orisano/feat-empty-cache-from
feat: drop empty tag on cache_from
This commit is contained in:
commit
263d18ce93
@ -1078,7 +1078,7 @@ class Service(object):
|
|||||||
pull=pull,
|
pull=pull,
|
||||||
nocache=no_cache,
|
nocache=no_cache,
|
||||||
dockerfile=build_opts.get('dockerfile', None),
|
dockerfile=build_opts.get('dockerfile', None),
|
||||||
cache_from=build_opts.get('cache_from', None),
|
cache_from=self.get_cache_from(build_opts),
|
||||||
labels=build_opts.get('labels', None),
|
labels=build_opts.get('labels', None),
|
||||||
buildargs=build_args,
|
buildargs=build_args,
|
||||||
network_mode=build_opts.get('network', None),
|
network_mode=build_opts.get('network', None),
|
||||||
@ -1116,6 +1116,12 @@ class Service(object):
|
|||||||
|
|
||||||
return image_id
|
return image_id
|
||||||
|
|
||||||
|
def get_cache_from(self, build_opts):
|
||||||
|
cache_from = build_opts.get('cache_from', None)
|
||||||
|
if cache_from is not None:
|
||||||
|
cache_from = [tag for tag in cache_from if tag]
|
||||||
|
return cache_from
|
||||||
|
|
||||||
def can_be_built(self):
|
def can_be_built(self):
|
||||||
return 'build' in self.options
|
return 'build' in self.options
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user