diff --git a/salt/modules/dockermod.py b/salt/modules/dockermod.py index db70e28fcf..9cd7285c85 100644 --- a/salt/modules/dockermod.py +++ b/salt/modules/dockermod.py @@ -939,6 +939,9 @@ def compare_containers(first, second, ignore=None): if item == 'Ulimits': val1 = _ulimit_sort(val1) val2 = _ulimit_sort(val2) + if item == 'Env': + val1 = sorted(val1) + val2 = sorted(val2) if val1 != val2: ret.setdefault(conf_dict, {})[item] = {'old': val1, 'new': val2} # Check for optionally-present items that were in the second container @@ -965,6 +968,9 @@ def compare_containers(first, second, ignore=None): if item == 'Ulimits': val1 = _ulimit_sort(val1) val2 = _ulimit_sort(val2) + if item == 'Env': + val1 = sorted(val1) + val2 = sorted(val2) if val1 != val2: ret.setdefault(conf_dict, {})[item] = {'old': val1, 'new': val2} return ret