How to install docker in macos catalina. I tried few of the commands but it gives me error

First way

brew install dockerUpdating Homebrew...==> Auto-updated Homebrew!Updated Homebrew from 805f0ba3c to e344cb6af.Updated 3 taps (homebrew/core, homebrew/cask and homebrew/services).==> New Formulaefunc-e [email protected] scorecard==> Updated FormulaeUpdated 987 formulae.==> New Casksitraffic millie==> Updated CasksUpdated 82 casks.==> Homebrew was updated to version 3.2.2The changelog can be found at:https://github.com/Homebrew/brew/releases/tag/3.2.2Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker==> Downloading https://ghcr.io/v2/homebrew/core/docker/manifests/20.10.7######################################################################## 100.0%==> Downloading https://ghcr.io/v2/homebrew/core/docker/blobs/sha256:4d09b76ce85c651cb4454ddf2ed8b3f680231793747f5d997a1a41111e92e997==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4d09b76ce85c651cb4454ddf2ed8b3f680231793747f5d997a1a41111e92e997?se=2021-07-13T10%3A55%3A00Z&sig=LsXE2Zl837KnqgAAJ%2BrUbN%2BpuRa7tvImtKh36kwMRPc%3D&sp=######################################################################## 100.0%==> Pouring docker--20.10.7.catalina.bottle.tar.gz==> Caveatszsh completions have been installed to:/usr/local/share/zsh/site-functions==> Summary🍺 /usr/local/Cellar/docker/20.10.7: 12 files, 58.9MBdocker pull rubyUsing default tag: latestCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?aniket_tiwari@ACD-123-1212 ~ % sudo docker pull rubyPassword:Using default tag: latestCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Then I uninstall it and install using cask

Second way

brew install --cask dockerUpdating Homebrew...==> Auto-updated Homebrew!Updated Homebrew from e344cb6af to cc03c2c15.Updated 2 taps (homebrew/core and homebrew/cask).==> New Formulae[email protected] libfuse@2 rhit==> Updated FormulaeUpdated 213 formulae.==> Updated CasksUpdated 31 casks.==> Downloading https://desktop.docker.com/mac/stable/amd64/66501/Docker.dmg######################################################################## 100.0%==> Installing Cask docker==> Moving App 'Docker.app' to '/Applications/Docker.app'==> Linking Binary 'docker-compose.bash-completion' to '/usr/local/etc/bash_completion.d/docker-compose'==> Linking Binary 'docker.zsh-completion' to '/usr/local/share/zsh/site-functions/_docker'==> Linking Binary 'docker.fish-completion' to '/usr/local/share/fish/vendor_completions.d/docker.fish'==> Linking Binary 'docker-compose.fish-completion' to '/usr/local/share/fish/vendor_completions.d/docker-compose.fish'==> Linking Binary 'docker-compose.zsh-completion' to '/usr/local/share/zsh/site-functions/_docker_compose'==> Linking Binary 'docker.bash-completion' to '/usr/local/etc/bash_completion.d/docker'🍺 docker was successfully installed!aniket_tiwari@ACD-123-1212 ~ % docker pszsh: command not found: dockeraniket_tiwari@ACD-123-1212 ~ % docker versionzsh: command not found: dockeraniket_tiwari@ACD-123-1212 ~ % docker --versionzsh: command not found: docker

MacOS Catalina - 10.15.7

2

Best Answer


Here are the Docker Desktop release notes with download links:

https://docs.docker.com/desktop/release-notes/

4.16.0: (2023-01-12)

Minimum OS version to install or update Docker Desktop on macOS is nowmacOS Big Sur (version 11) or later.

So the last runnable version should be 4.15.0 for Catalina (10.15.7) and it can be downloaded from this page.

URL don't exist forever and there will be a day, when this answer becomes invalid. I note the target URL in case they exist for longer.

  • https://desktop.docker.com/mac/main/amd64/93002/Docker.dmg
  • https://desktop.docker.com/mac/main/arm64/93002/Docker.dmg

In case of Catalina it is most likely the first link (amd64).

As last resort a search engine may discover the files by checksum:

Mac Intel: SHA-256 bee41d646916e579b16b7fae014e2fb5e5e7b5dbaf7c1949821fd311d3ce430b

Mac Arm: SHA-256 fc8609d57fb8c8264122f581c0f66497e46e171f8027d85d90213527d6226362

It seems that Docker Desktop 4.16 does not support macOS Catalina (10.15) any more.

If you don't want to update to a newer macOS version, you can install an older version of Docker Desktop which still works on macOS Catalina.Docker Desktop 4.15 works on Catalina.

You can install it this way using Homebrew:

# Download Cask code for Docker Desktop 4.15.0,93002curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/1a83f3469ab57b01c0312aa70503058f7a27bd1d/Casks/docker.rb -O# Install Docker Desktop from Cask Codebrew install --cask docker.rb# OR# if Docker Desktop is already installed then reinstall from Cask Codebrew reinstall --cask docker.rb