docker: command not found with Jenkins build and publish plugin on Mac
It fails with below error
java.io.IOException: Cannot run program "docker" (in directory "***"): error=2, No such file or directory
Looks like docker is not available to jenkins user but available to root and other user on my Mac.
sudo su jenkins bash-3.2$ docker ps bash: docker: command not found sudo su XXX bash-3.2$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bash-3.2$
Is this some permissions issue? Can you please help?
One Solution collect form web for “docker: command not found with Jenkins build and publish plugin on Mac”
Inspect the permissions of the docker binary:
stat $(where docker)
Check the owner and group,
in osx stuff is usually in staff group, try adding your
jenkins user to that group:
sudo dseditgroup -o edit -a jenkins -t user staff