spring-boot-docker-postgres icon indicating copy to clipboard operation
spring-boot-docker-postgres copied to clipboard

Docker plugin does not work when executed within STS

Open robert-bor opened this issue 8 years ago • 1 comments

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.

robert-bor avatar Feb 16 '17 07:02 robert-bor

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!

sptdevos avatar Feb 16 '17 13:02 sptdevos