I attempted to set up Docker so that I do not have to type sudo
before using it.
The steps that I took:
- I started with creating a docker group with
sudo groupadd docker
; - I added my current user to the "docker" group with
sudo gpasswd -a ${USER} docker
; - I restarted docker with
sudo service docker restart
; - I closed and opened the terminal to start a new session.
After running docker run hello-world
, I receive this output:
FATA[0000] Post http:///var/run/docker.sock/v1.17/containers/create: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
One thing that puzzles (and might give a hint about why I cannot run docker without sudo) is the output of:
$ groups
: is:
ltarasiewicz adm cdrom sudo dip plugdev lpadmin sambashare
(no "docker" group)
The output of $ groups ltarasiewicz
:
ltarasiewicz adm cdrom sudo dip plugdev lpadmin sambashare docker
("docker" is one of the groups)
What might be the reason for the fact that I still cannot use Docker withou sudo
after adding my current user to the "docker" group?