The following error occured while trying to connect to the Docker daemon after installation.

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post [...]: dial unix /var/run/docker.sock: connect: permission denied.

The daemon was not accessible by the current user because of lack of permission. The solution is to add the current user to the docker group to gain permission for connection.

sudo usermod -a -G docker $USER

After executing the above command, log out from the current shell and log out from the account.

Leave a Reply