support for environ in docker containers and better parsing of cmd arguments