When running any docker command, via some other user, not root, and getting error as - Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock is fixable by fixing the permission for /var/run/docker.sock file.
Docker tool is install with 'root' user hence all the files and folder is owned by 'root' user only, Let's check what permission is there for /var/run/docker.sock
$ ls -l /var/run/docker.sock
srw-rw---- 1 root root 0 Jan 21 13:42 /var/run/docker.sock
$ chmod 666 /var/run/docker.sock
srw-rw-rw- 1 root root 0 Jan 21 13:42 /var/run/docker.sock
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
testimage latest fe74c7378812 6 days ago 288MB
docker.elastic.co/logstash/logstash 7.5.1 8b94897b4254 3 months ago 804MB
docker.elastic.co/kibana/kibana 7.5.1 2d043e33afa4 3 months ago 949MB
docker.elastic.co/elasticsearch/elasticsearch 7.5.1 2bd69c322e98 3 months ago 779MB
docker.elastic.co/beats/metricbeat 7.5.1 dbefecbff197 3 months ago 460MB
docker.elastic.co/beats/filebeat 7.5.1 00c5b17745d1 3 months ago 359MB
docker.elastic.co/beats/packetbeat 7.5.1 9f7e0f7cbaa3 3 months ago 338MB
docker.elastic.co/beats/journalbeat 7.5.1 49132d8b2ac8 3 months ago 329MB
Voilla!!, You are set to go...see you in next post..till then...Happy Learning !!
Facebook Page Facebook Group Twitter Feed Telegram Group
No comments:
Post a Comment