Skip to content

Instantly share code, notes, and snippets.

@YouSysAdmin
Created March 25, 2025 20:39
Show Gist options
  • Save YouSysAdmin/e4b0f6907eef15b37442daaaab2ca041 to your computer and use it in GitHub Desktop.
Save YouSysAdmin/e4b0f6907eef15b37442daaaab2ca041 to your computer and use it in GitHub Desktop.
Fix for using MacOS as remote DOCKER_HOST
# Context:
# make sure the URL is valid, and Docker 18.09 or later is installed on the remote host.
# zsh:1: command not found: docker
# Add /usr/local/bin to PATH for SSH session
echo 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin' >> ~/.ssh/environment
# Permit set user environment for SSH session
sudo sh -c 'echo "PermitUserEnvironment PATH" >> /private/etc/ssh/sshd_config'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment