从mac上通过docker-machine给远程的centos安装docker

http://www.thegeekstuff.com/2016/02/docker-machine-create-generic/ 在根据这篇文章使用docker-machine安装docker的时候,执行

docker-machine create -d generic --generic-ip-address remote-ip --generic-ssh-user user machine-name

总提示报错:

Running pre-create checks...
Creating machine...
(xxx) 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...
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

我用的是

本机:mac
远程:centos 6.5
工具:docker-machine

https://github.com/docker/machine/issues/3553 在官方的issue中找到了原因,是因为/etc/os-release是在centos 7之后才有的这个文件,所以如果你的远程服务器是6.x,就无法通过docker-machine来安装docker了

你可能感兴趣的:(从mac上通过docker-machine给远程的centos安装docker)