I am new to docker. I just tried to use docker in my local machine(Ubuntu 16.04) with Jenkins.
I configured a new job with below pipeline script.
sudo usermod -a -G docker jenkins sudo service jenkins restart