I am trying to create a docker-machine using generic driver. The machine has CentOs 6.7 installed on it which docker machine is not able to detect. I ran this,
docker-machine create -d generic --generic-ip-address=XXX.XXX.XXX.XX --generic-ssh-user user --generic-ssh-key ~/.ssh/id_rsa dm-generic
And I am getting this error while executing the above command.
Running pre-create checks...
Creating machine...
(dm-generic) 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...
Error creating machine: Error detecting OS: Error getting SSH command: Something went wrong running an SSH command!
command : cat /etc/os-release
err : exit status 1
output : cat: /etc/os-release: No such file or directory
I am using CentOS release 6.7 (Final) which docker is not able to detect. It does not contains /etc/os-release but it contains /etc/centos-release.
/etc/centos-release contains
CentOS release 6.7 (Final)
Hi @guptaishabh, thanks for the issue.
I think maybe it probably has /etc/centos-release
or /etc/redhat-release
file instead? This is a known issue, please check and report back whether that's true.
Yes It contains both of these files. But both of them does not contains data in the format which /etc/os-release
have but it only contains CentOS release 6.7 (Final)
. Thanks!
Yes It contains both of these files. But both of them does not contains data in the format which /etc/os-release have but it only contains CentOS release 6.7 (Final)
Hm, weird. Guess we'll have to add some special code to account for this case.
The version of centos should be 7.0 or above.
dup? #2143
same with MacOSx any update on this?
Most helpful comment
Hm, weird. Guess we'll have to add some special code to account for this case.