A quick note this time around: After installing Docker on my Linux Mint laptop, I wanted to be able to run it with my normal user account and not have to SUDO every time I wanted to start a container. (Please be advised that doing so can be considered a HUGE security hole, but since I am just testing Docker, I was willing to risk it).
In order to do this, all of the documentation I found said to create a Docker group, and then add my user account to that group, and restart. This is fairly simple to accomplish with the GUI Users and Groups tool. The Docker daemon then uses that group to see if the user account has permissions to start Docker and connect to the daemon. The result? I would get this error: Cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host? After trying several things, I finally found the solution.
- From a terminal prompt run this command:
You should see a line indicating your Docker host is set to an IP address. You will need to clear it.
- At the terminal prompt, switch to your home folder:
- Now, edit your shell profile:
- Look for a line like this:
- Add a comment marker (#) before it or delete the line completely. Save your profile file and exit.
- Restart your system, and you should now be able to run Docker using your normal user account.