Fix errors in docker file and permissions