Zuletzt aktiv 1734363048

How to "fix" "docker: command not found"

Änderung 7f0326b688502564fab62ed2d68bafe1b00ae6ac

dockerpaths.md Orginalformat

PATH variable in zsh (or bash) has been bedeviling y'all. See https://zcw.guru/kristofer/path-intro

things like docker: command not found are most likely, if you have installed Docker Desktop, because you haven't added the bin directory where all the docker command line programs are. There are two primary places Docker Desktop keeps its binaries (those pesky programs.) Where those programs are is dependent on wheter you check the System or User radio button in the Advanced Settings UI of the docker app.

Yep. It even tells us where they are.

If you use the System button, you have to add /usr/local/bin to your PATH

export PATH=/usr/local/bin:$PATH

if you clicked the User one, you'd need to have $HOME/.docker/bin in your PATH.

export PATH=$HOME/.docker/bin:$PATH

Works for for both BASH and ZSH shells

This same idea is used to resolve command-not-found issues with the command line client programs of databases (like mysql and postgres)