Reading `/etc/group` to determine, whether the `docker` group exists or not is not really the best way, as this leaves other auth mechanisms like NIS, LDAP etc out in the dark. Instead the [`getgrnam`](http://man7.org/linux/man-pages/man3/getgrnam.3.html) syscall should be used.

See also #1715 which I just opened regarding this.