Я пытаюсь с помощью команды docker-machine create
создать машину поверх существующей капли DigitalOcean (я не должен создавать новую каплю и удалять существующую). Использование драйвера digitalocean в этом случае недопустимо, и я использую решение драйвера generi c. Я использую docker -машин с подсистемой Ubuntu Windows 10 (также я пробовал ее с Git Bash), и я использую Windows 10 Pro с Hyperv.
Капля DigitalOcean имеет Ubuntu 18.04 . Docker версия:
root@do-sctv:~# docker version
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:25:46 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:24:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Команда, которую я запускаю, выглядит следующим образом:
$ docker-machine create --driver generic --generic-ip-address 142.xx.xxx.xx --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa_do_sctv do-sctv
, и я получаю следующий вывод:
Running pre-create checks...
Creating machine...
(do-sctv) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of r
etries (10) exceeded
У меня есть В брандмауэре UFW включены следующие порты (в дроплете):
ufw allow 22/tcp
ufw allow 2376/tcp
ufw allow 7946/tcp
ufw allow 7946/udp
ufw allow 4789/udp
Кроме того, я попытался docker-machine regenerate-certs --force --client-certs do-sctv
с той же ошибкой. При выполнении docker-machine ls
я получаю следующую ошибку:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
do-sctv - generic Running tcp://142.xx.xxx.xx:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
При docker-machine env do-sctv
вывод:
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "142.xx.xxx.xx:2376": dial tcp 142.xx.xxx.xx:2376: connect: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.
Надеюсь, вы мне поможете. Спасибо.