Jenkins pipeline fails with error : "docker : permission deinied"

I’m trying to run my react & nodeJs project on jenkins with docker, to create CI/CD ability. at the moment I just want to make sure it works in the most simple way.

• I had an error on the same location at the pipeline with message : "docker:not found"
I’ve solved it using "-v \$(which docker):/usr/bin/docker" when starting jenkins.

Now - I understand I need permission for jenkins to use docker, and I found this terminal command line that should solve it: "usermod -G docker -a jenkins" and I get an error (on a Mac) : "zsh: command not found: usermod"

any help would be appreciated, to modify or replace this line, or another idea that might work. thanks !

Source: Docker Questions