Docker plugin does not work when executed within STS
You will see the following error:
Cannot run program "docker": error=2, No such file or directory
STS cannot find Docker because it was not started up with the environment's env variables. See https://github.com/Transmode/gradle-docker/issues/65
The following solution has been witnessed to work:
open -a "STS" &
This will startup STS with all the environment variables.
Thanks to Bas for pointing out the error.
The problem is that my IDE does not have the same PATH available as my terminal. To be able to start my IDE from the dock and still be able to run docker from it I had to fix the PATH for this application:
In /Applications/STS.app/Contents/Info.plist I had to add a <key>/<dict> pair to the existing <dict> node:
<key>LSEnvironment</key>
<dict>
<key>PATH</key>
<string>enter the output of "echo $PATH" here...</string>
</dict>
Do not forget to run following command to apply changes to Info.plist:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/STS.app
No need to run 'open -a "STS" &' from terminal anymore!