我在我的 Mac 上安装了 Docker Desktop(不是 Docker Toolkit),并根据官方文档安装了 docker-machine
我正在尝试将我的 localhost Docker 引擎添加为 docker 机器下的 docker 节点,但没有成功。
我所做的步骤是:
在 localhost 中启用 sshd(
ssh localhost
有效)将 localhost Docker 添加到 Docker 机器:
docker-machine create --driver generic --generic-ip-address 127.0.0.1 --generic-ssh-user <"ssh_username"> <node_name>
Running pre-create checks...
Creating machine...
(localhost) No SSH key specified. Assuming an existing key at the default location.
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Password:
Detecting the provisioner...
Password:
Error creating machine: Error detecting OS: Error getting SSH command: ssh command error:
command : cat /etc/os-release
err : exit status 1
output : cat: /etc/os-release: No such file or directory
的输出docker-machine ls
docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
localhost - generic Running tcp://127.0.0.1:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
对不起我的英语,我不是本地人。