Docker-machine是 Docker 官方提供的一个工具,它可以帮助我们在远程的机器上安装 Docker,或者在虚拟机 host 上直接安装虚拟机并在虚拟机中安装 Docker。我们还可以通过 docker-machine 命令来管理这些虚拟机和 Docker。
安装 Docker Machine
1.在官网下载docker-machine-Linux-x86_64-1.15.0安装包
[root@foundation3 ~]# cd /usr/local/bin/
[root@foundation3 bin]# chmod +x docker-machine-Linux-x86_64-1.15.0
###给执行权限
[root@foundation3 bin]# ln -s docker-machine-Linux-x86_64-1.15.0 docker-machine
###做软链接
查看一下安装版本
2.因为docker-machine是通过ssh连接到其它主机的,所以要做ssh免密
[root@foundation3 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved