[root@trainoo-1 ~]# docker-machine create --driver generic --generic-ip-address=192.168.209.102 trainoo-2 Running pre-create checks... Creating machine... (trainoo-2) 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... Detecting the provisioner... Provisioning with centos... Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env trainoo-2
此过程中,也许会遇到下面这个问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[root@trainoo-1 ~]# docker-machine create --driver generic --generic-ip-address=192.168.209.103 trainoo-3 Running pre-create checks... Creating machine... (trainoo-3) 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... Detecting the provisioner... Provisioning with centos... Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.209.103:2376": dial tcp 192.168.209.103:2376: connect: no route to host
# 安装方法如下,执行一下shell命令: base=https://raw.githubusercontent.com/docker/machine/v0.14.0 for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash do sudo wget "$base/contrib/completion/bash/${i}" -P /etc/bash_completion.d done