如何在 macos catalina 中安装 docker。我尝试了一些命令,但它给了我错误
第一种方法
brew install docker
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 805f0ba3c to e344cb6af.
Updated 3 taps (homebrew/core, homebrew/cask and homebrew/services).
==> New Formulae
func-e [email protected] scorecard
==> Updated Formulae
Updated 987 formulae.
==> New Casks
itraffic millie
==> Updated Casks
Updated 82 casks.
==> Homebrew was updated to version 3.2.2
The changelog can be found at:
https://github.com/Homebrew/brew/releases/tag/3.2.2
Warning: 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
==> Caveats
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/docker/20.10.7: 12 files, 58.9MB
docker pull ruby
Using default tag: latest
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
aniket_tiwari@ACD-123-1212 ~ % sudo docker pull ruby
Password:
Using default tag: latest
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
然后我卸载它并使用木桶安装
第二种方式
brew install --cask docker
Updating 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 Formulae
Updated 213 formulae.
==> Updated Casks
Updated 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 ps
zsh: command not found: docker
aniket_tiwari@ACD-123-1212 ~ % docker version
zsh: command not found: docker
aniket_tiwari@ACD-123-1212 ~ % docker --version
zsh: command not found: docker
MacOS Catalina - 10.15.7
以下是 Docker Desktop 发行说明以及下载链接:
https://docs.docker.com/desktop/release-notes/
4.16.0: (2023-01-12)
现在在 macOS 上安装或更新 Docker Desktop 的最低操作系统版本是 macOS Big Sur(版本 11)或更高版本。
所以 Catalina 的最后一个可运行版本应该是 4.15.0 (10.15.7),可以从这个页面下载。
URL不会永远存在,总有一天,这个答案会失效。我记下目标 URL,以防它们存在的时间更长。
对于 Catalina,它很可能是第一个链接 (amd64)。
作为最后的手段,搜索引擎可能会通过校验和发现文件:
Mac 英特尔:SHA-256 bee41d646916e579b16b7fae014e2fb5e5e7b5dbaf7c1949821fd311d3ce430b
Mac 手臂:SHA-256 fc8609d57fb8c8264122f581c0f66497e46e171f8027d85d90213527d6226362
Docker Desktop 4.16 似乎不再支持 macOS Catalina (10.15)。
如果您不想更新到较新的 macOS 版本,可以安装仍可在 macOS Catalina 上运行的旧版本 Docker Desktop。 Docker Desktop 4.15 可在 Catalina 上运行。
您可以使用 Homebrew 以这种方式安装它:
# Download Cask code for Docker Desktop 4.15.0,93002
curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/1a83f3469ab57b01c0312aa70503058f7a27bd1d/Casks/docker.rb -O
# Install Docker Desktop from Cask Code
brew install --cask docker.rb
# OR
# if Docker Desktop is already installed then reinstall from Cask Code
brew reinstall --cask docker.rb
它到处都被删除了,所以我抓住了链接..这里是: https://desktop.docker.com/mac/main/amd64/93002/Docker.dmg
以防万一...