diff --git a/salt/states/dockerng.py b/salt/states/dockerng.py
index <HASH>..<HASH> 100644
--- a/salt/states/dockerng.py
+++ b/salt/states/dockerng.py
@@ -183,6 +183,8 @@ def _compare(actual, create_kwargs, defaults_from_image):
             continue
 
         elif item == 'environment':
+            if actual_data is None:
+                actual_data = []
             actual_env = {}
             for env_var in actual_data:
                 try:
docker daemon returns sometimes empty list and sometimes None

We deal with it