diff --git a/nginx_proxy.py b/nginx_proxy.py index eb0bff5..4c0c19c 100755 --- a/nginx_proxy.py +++ b/nginx_proxy.py @@ -47,6 +47,8 @@ def analyse_env_vars(inspect_data): """Extracts the environment variables from the given result of an 'inspect container' call.""" env_data = {} + if not 'Env' in inspect_data['Config'] or inspect_data['Config']['Env'] is None: + return env_data for env_var in inspect_data['Config']['Env']: t = env_var.split("=") env_data[t[0]] = t[1]