mirror of
https://github.com/docker/docs.git
synced 2026-04-04 02:08:57 +07:00
Move v1-v2 config normalization to separate function.
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
@@ -504,6 +504,10 @@ def finalize_service(service_config):
|
||||
if 'restart' in service_dict:
|
||||
service_dict['restart'] = parse_restart_spec(service_dict['restart'])
|
||||
|
||||
return normalize_v1_service_format(service_dict)
|
||||
|
||||
|
||||
def normalize_v1_service_format(service_dict):
|
||||
if 'log_driver' in service_dict or 'log_opt' in service_dict:
|
||||
if 'logging' not in service_dict:
|
||||
service_dict['logging'] = {}
|
||||
|
||||
Reference in New Issue
Block a user