Docker, установленный через Homebrew на Catalina — не удается подключиться к демону Docker

#docker

#docker

Вопрос:

Я установил Docker (19.03.12) и Docker-Machine через Homebrew на Catalina (10.15.6) Когда я пытаюсь выполнить простую команду, такую как docker images я получаю сообщение

Не удается подключиться к демону Docker в unix:///var/run/docker.sock. Запущен ли демон docker?

Это команды, которые я использовал для подтверждения того, что служба Docker-machine установлена и запущена

     username@hostname ~ % brew install docker docker-compose docker-machine
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 1 formula.

Warning: docker 19.03.12 is already installed and up-to-date
To reinstall 19.03.12, run `brew reinstall docker`
==> Downloading https://homebrew.bintray.com/bottles/docker-compose-1.27.2.catalina.bottle.tar.gz
Error: docker-compose 1.26.2 is already installed
To upgrade to 1.27.2, run `brew upgrade docker-compose`.
==> Downloading https://homebrew.bintray.com/bottles/docker-machine-0.16.2.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/99b50d9809a0aa881e01686e3356fbd17fa61e5a5e8cb937a2a9e9ff103be097?response-content-disposition=attachm
==> Pouring docker-machine-0.16.2.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

To have launchd start docker-machine now and restart at login:
  brew services start docker-machine
Or, if you don't want/need a background service you can just run:
  docker-machine start
==> Summary
🍺  /usr/local/Cellar/docker-machine/0.16.2: 11 files, 36MB
username@hostname ~ % docker images                                    
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
username@hostname ~ % brew services start docker-machine
==> Successfully started `docker-machine` (label: homebrew.mxcl.docker-machine)
username@hostname ~ % docker images                     
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
username@hostname ~ % sudo docker images
Password:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
username@hostname ~ % 

username@hostname ~ % brew services
Name           Status  User   Plist
docker-machine started username /Users/username/Library/LaunchAgents/homebrew.mxcl.docker-machine.plist
httpd          started username /Users/username/Library/LaunchAgents/homebrew.mxcl.httpd.plist
php@7.2        started username /Users/username/Library/LaunchAgents/homebrew.mxcl.php@7.2.plist

username@hostname ~ % docker-machine ls                            
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER      ERRORS
default   -        virtualbox   Running   tcp://192.168.99.101:2376           v19.03.12  
  

Комментарии:

1. (Вам не понадобится компьютер Docker на современной macOS; вместо этого установите приложение Docker для настольных компьютеров.)