Facebook
Twitter
LinkedIn
YouTube
GitHub
Hasan's Blog
  • Home
    • About me
  • Hashicorp
  • Ansible
  • CI/CD
  • DevOps

dial unix /var/run/docker.sock: permission denied

2017/09/13Hasan YousufCI/CD, DevOps

(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.30/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/

Solution:

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.

As a temporary solution, you can use sudo to run the failed command as root.
However it is recommended to fix the issue by adding the current user to the docker group:

Run this command in your favourite shell and then completely log out of your account and log back in (if in doubt, reboot!):

  • sudo usermod -a -G docker $USER

After doing that, you should be able to run the command without any issues. Run docker run hello-world as a normal user in order to check if it works. Reboot if the issue still persists.

Logging out and logging back in is required because the group change will not have an effect unless your session is closed.

Previous post Minimise your development time by automating your redundant tasks using Nodejs (Gruntjs) Next post How to completely uninstall Android Studio on MAC?

Categories

  • Casperjs (1)
  • CI/CD (4)
  • DevOps (6)
  • Gruntjs (2)
  • Jira (1)
  • Linux (1)
  • Programming (1)
  • Uncategorized (14)
  • VMware (1)

Archives

  • May 2020 (1)
  • April 2020 (1)
  • March 2020 (2)
  • September 2019 (2)
  • May 2018 (1)
  • September 2017 (3)
  • July 2017 (1)
  • June 2017 (4)
  • May 2017 (1)
  • July 2015 (2)
  • January 2015 (1)
  • October 2014 (1)
  • September 2014 (5)
  • August 2014 (1)

Tags

Arduino Arduino sketch Arduino sketch upload bash shell casperjs Couchdb Curl docker container docker images github Gitlab gnu Parallel gruntjs JAVA JAVA jenkins Jira JPA Json Linux linux mint Maven mint MYSQL Tomcat Ubuntu Version Control xpath
  • Home
    • About me
  • Hashicorp
  • Ansible
  • CI/CD
  • DevOps
@2017
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Preferences
{title} {title} {title}