0

I'm sorry if this seems to be a stupid question since I'm completely new to Jenkins and Docker. I'm setting up Jenkins and Docker in an Azure linux(Ubuntu 16.04) VM. Since I want to run docker in Jenkinsfile (without sudo), I will need to add user to docker group.
Therefore I followed this: Post-installation steps for Linux from Docker. However, I'm getting this error message when running $ sudo usermod -aG docker $USER

sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting

After restarting the VM, I'm now getting this message after running $ Docker images

WARNING: Error loading config file: /home/terryxychan/.docker/config.json: stat /home/terryxychan/.docker/config.json: permission denied
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        2 months ago        1.84k

Somehow I'm getting both the 'permission denied' message and the actual message itself.

When I tried to build it using jenkinsfile, it gives me this error:

+ docker build -t terryxychan/python-demo-1:4 .
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

Does anyone ran into the same problem with Azure VM before? Thanks!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.