Docker couldn't use LDAP authentication

Hi there,

I’m trying to allow LDAP users in LDAP group ‘docker’ to connect docker and they got something this:
**[xxx.xxx@xxx-srv-xxx:xxx]$ docker ps -a
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
**
now I can only work around this problem by adding them into the local group ‘docker’, then they will be able to connect, as ‘local’ docker group member.

is there something that I missed? anyone met this before?

Many thanks!

Here is my fix for allowing the ldap docker group users to use docker.

  1. Create a docker group on ldap
  2. Get the group id number
  3. DOCKERGROUPID=1007. #Replace 1007 with the GID you created
  4. sudo chown root:docker /var/run/docker.sock
  5. sudo groupdel docker
  6. sudo groupadd -g $DOCKERGROUPID docker
  7. sudo chmod 660 /var/run/docker.sock
  8. sudo chown root:docker /var/run/docker.sock
  9. sudo systemctl daemon-reload
  10. sudo systemctl restart docker

Step 9 is probably not needed but I left it from the debug process.