One of the issues is that docker-machine will error out when there is no compatible os against /etc/os-release.
Let's add a --generic-os
command so we can tell docker-machine what OS to exactly use!
For ex:
./bin/docker-machine create --driver generic --generic-ip-address 10.10.10.1 --generic-ssh-user centos --generic-os rhel
This will fill in the holes with certain providers (namely Oracle Linux) where providing an os option such as "rhel" would be suitable when there is no generic driver. This will fix issue https://github.com/docker/machine/issues/3164
Another being Project Atomic hosts (disclaimer; I'm part of the team) where /etc/os-release still lists "fedora" rather than "atomichost" (this has been fixed but won't apply until the next Fedora release, the CentOS team will take even longer to incorporate).
I think I'd prefer to just handle the special cases -- I'm not sure if anyone other than Redhat and CentOS violates the common convention of /etc/os-release
, so maybe we can just check for those files specifically.
Oracle Linux case is handled. You may still need this for Project Atomic.
@ezarko https://github.com/docker/machine/pull/3278/files I'm assuming?
@cdrage exactly
"Container-Optimized OS" from google cloud is another not supported
$ cat /etc/os-release
BUILD_ID=9460.64.0
NAME="Container-Optimized OS"
KERNEL_COMMIT_ID=efee0d7cfca9bf17817d7b5d796b56fa75c3b217
GOOGLE_CRASH_ID=Lakitu
VERSION_ID=59
BUG_REPORT_URL=https://crbug.com/new
PRETTY_NAME="Container-Optimized OS from Google"
VERSION=59
GOOGLE_METRICS_PRODUCT_ID=26
HOME_URL="https://cloud.google.com/compute/docs/containers/vm-image/"
ID=cos
Like... as long as the OS has systemd, wouldn't this be viable / work?
Running into the same issue, as @gzunino The "Container-Optimized OS" gives this error when using docker-machine on google compute engine instance with their container optimized os (with docker preinstalled)
Same issue with Gentoo:
cat /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
Most helpful comment
"Container-Optimized OS" from google cloud is another not supported