If you run
brew install --cask docker
you may get an error message like this:
❯ brew install --cask docker
==> Downloading https://desktop.docker.com/mac/main/arm64/99724/Docker.dmg
######################################################################## 100.0%
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Backing App 'Docker.app' up to '/opt/homebrew/Caskroom/docker/4.17.0,99724/Docker.app'
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.17.0,99724 of Cask docker
Error: It seems there is already a Binary at '/opt/homebrew/share/zsh/site-functions/_docker'.```
This error occurs, when docker is already installed. To fix this error, run:
brew remove docker
After that, run this command again:
brew install --cask docker
The problem should now be gone.