Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: connect: permission denied
解决方法： >the error message tells you that your current user can’t access the docker engine, because you’re lacking permissions to access the unix socket to communicate with the engine. Temporary solution Use the
sudo command to execute the commands with elevated permissions every time. Permanent (suggested) solution Add the current user to the docker group. This can be achieved by typing
sudo usermod -a -G docker $USER
You have to log out and log in again for the group membership to take effect.