Fixed retrieval of environment variables for docker