This works. Also found /Applications/Docker.app/Contents/Resources/bin/docker ____ as Execute Shell also works. But shouldn't there be an option to set path permanently and only use actual docker commands?
So I did a Terminal vim .bash_profile and added:
export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/Users/abacker/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin
export Docker_Home=/usr/local/bin
export PATH=$PATH:$Docker_Home
And on Jenkins Global Tools Config Docker section I added:
Name: Docker_Home
Root: /usr/local/binBut this fails with same error.
This is what I see in Jenkins logs when execute shell is: /usr/local/bin/docker images
Commit message: "Merge pull request #65 from Test-IT/saucelabsReplica"
> git rev-list --no-walk 03d6955a8ad9d7b85c79ed3789030ea9da930f9a # timeout=10
[ZaleniumSingle] $ /bin/sh -xe /var/folders/8v/z503nb6n6m9byyvlb6g5bf9c0000gp/T/jenkins3464149420441257087.sh
+ /usr/local/bin/docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gm4afsal/cheers2019 latest 8aed96ebfcda 2 days ago 4.01MB
elgalu/selenium latest 799e7781f0c4 13 days ago 1.57GB
selenium/node-chrome-debug latest 04414d01df54 3 weeks ago 947MB