When I run the docker command on Linux without sudo, I get the following permission error:
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.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied
By default, root execute permission is required, but you can use the following procedure to hit the docker command without sudo.
#Create docker user group
sudo groupadd docker
#Add current user to docker group
sudo usermod -aG docker $USER
#Immediately reflect changes
newgrp docker
Recommended Posts