Getting started step error: make generate - docker.sock permission denied
schlos opened this issue · 1 comments
schlos commented
I was following getting started steps and got stuck at step make generate
make generate
# Avoid prompting for sudo unless the permissions actually need to be chnaged by piping find to xargs
find example-keybaseca-volume/ -not -user $USER | xargs -I {} -- sudo chown -R $USER {}
docker build -t ca -f Dockerfile-ca ..
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=docker%2FDockerfile-ca&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=kr7zv2uv82d92d18vqtu95o6g&shmsize=0&t=ca&target=&ulimits=null&version=1: dial unix /var/run/docker.sock: connect: permission denied
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 1
I'm running docker server on Azure (with already installed 1 docker image on this server).
Are any special permissions required?
schlos commented
Found potential solution at
https://techoverflow.net/2018/12/15/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/
Before adding my user to docker group:
$groups
my_username adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev
After adding my user to the docker group:
$ groups
my_username adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev docker
This has resolved my issue.