I have a self hosted linux agent, where I can docker, npm, nodeJs installed.
I want to execute a simple container job, where I fetch the publicly available image 'ubuntu:18.04' and just echo a line on to the terminal.
But I end up facing this issue:
Starting: Initialize containers
/usr/bin/docker version --format '{{.Server.APIVersion}}'
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.24/version": dial unix /var/run/docker.sock: connect: permission denied
'
##[error]Exit code 1 returned from process: file name '/usr/bin/docker', arguments 'version --format '{{.Server.APIVersion}}''.
Finishing: Initialize containers
I researched a bit on to this issue, and added my user to the docker group, restarted the daemon, but still no success. Any suggestions?