|<<>>|6 of 322 Show listMobile Mode

Getting Docker in the path on MacOS

Published by marco on

I couldn’t call Docker from the command line. I had installed Docker a long time ago, but had just restored from a Time Machine backup, so my system was new but the applications had been restored. That meant that Docker had recorded that the executables had been sym-linked to the right folder (/usr/local/bin) but those links were part of the old, dead system.

Long story short, go to the settings, as shown below. If you’re in the situation that I was in, in which the app was out of sync with the system, then you’ll have to change something to get the app to apply the settings again.

 Docker Settings

You can try to simply switch from User to System, click Apply & Restart but that didn’t work for me. It never asked for my password or confirmation. However, I found the instructions in this answer to docker-compose command not available for mac (StackOverflow), which gave the tip to change other things on the page to force Docker to make the update.

“I fixed it by going to Docker app -> settings -> Advanced

“In advanced I had to check off:”

  • Allow the default Docker socket to be used (requires password)
  • Allow privileged port mapping (requires password)

“Click Apply & Restart

“And enable again options:”

  • Allow the default Docker socket to be used (requires password)
  • Allow privileged port mapping (requires password)
“Click Apply & Restart

If that still doesn’t work, then check whether you actually have a /usr/local/bin folder. Docker fails silently when the folder doesn’t exist. If you don’t have it, use an administrator and sudo to create the folder and try the procedure above again.

That did the trick for me.

If you’d like to link the tools to your user’s path ($HOME/.docker/bin) instead, then follow the instructions in this answer to Setting PATH environment variable in OSX permanently (StackOverflow) that show you how to modify the paths for your system.