This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

Getting Docker in the path on MacOS

Description

I couldn't call Docker from the command line. I had installed Docker a long time ago, but had just restored from a <i>Time Machine</i> backup, so my system was new but the applications had been restored. That meant that Docker <i>had recorded</i> that the executables had been sym-linked to the right folder (<c>/usr/local/bin</c>) 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. <img src="{att_link}docker_settings.webp" href="{att_link}docker_settings.webp" align="none" caption="Docker Settings" scale="35%"> You can try to simply switch from <c>User</c> to <c>System</c>, click <c>Apply & Restart</c> but that didn't work for me. It never asked for my password or confirmation. However, I found the instructions in this answer to <a href="https://stackoverflow.com/a/78834693" source="StackOverflow">docker-compose command not available for mac</a>, which gave the tip to change other things on the page to force Docker to make the update. <bq>I fixed it by going to <c>Docker app -> settings -> Advanced</c> In advanced I had to check off:<ul><c>Allow the default Docker socket to be used (requires password)</c> <c>Allow privileged port mapping (requires password)</c></ul>Click <c>Apply & Restart</c> And enable again options:<ul><c>Allow the default Docker socket to be used (requires password)</c> <c>Allow privileged port mapping (requires password)</c></ul>Click <c>Apply & Restart</c></bq> If that <i>still</i> doesn't work, then check whether you actually have a <c>/usr/local/bin</c> folder. Docker fails silently when the folder doesn't exist. If you don't have it, use an administrator and <c>sudo</c> 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 (<c>$HOME/.docker/bin</c>) instead, then follow the instructions in this answer to <a href="https://stackoverflow.com/a/78834693" source="StackOverflow">Setting PATH environment variable in OSX permanently</a> that show you how to modify the paths for your system.