It seems the App source '/Applications/Docker.app' is not there

While reinstalling Docker Desktop using Homebrew to fix some issues in getting started with my next idea, I encountered this error:

Error: docker: It seems the App source '/Applications/Docker.app' is not there.

It turns out I deleted Docker from the Applications directory without realizing I had previously installed it with Homebrew.

To fix this error, I ran

brew uninstall --cask docker
brew install --cask docker

If you’re wondering what —cask is about, it’s how you can download Docker Desktop for Mac, as opposed to just Docker Engine that installs if you run brew install docker. Since Docker Engine only runs on Linux, you would need to set up a VM before you can use it. Here are a couple of guides on this, if you’re interested. For most people, however, downloading Docker Desktop through brew install --cask docker is a more convenient way to do local development with Docker on Mac.