Docker Community Forums

Share and learn in the Docker community.

Docker-machine add existing amazon instance


(Mike0109) #1


I’m trying to add an existing amazon instance to docker-compose but when I run the docker-machine:

docker-machine create -d generic --generic-ip-address= --generic-ssh-key key_rhel.pem --generic-ssh-user ec2-user test6
Running pre-create checks…
Creating machine…
(test6) 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: OS type not recognized

and when I check the os-release:

cat /etc/os-release
NAME="Amazon Linux AMI"
ID_LIKE="rhel fedora"
PRETTY_NAME="Amazon Linux AMI 2016.03"

Is there an existing fix for this?


(Dvohra) #2

Amazon Linux AMI is not a base OS supported by Machine. Use Ubuntu LTS.

Note: You must use a base operating system supported by Machine.

"For cloud providers, the base operating system is the latest Ubuntu LTS the provider supports."

(Mike0109) #3

Can we resolve this without me needing to recreate the entire instance?

(Dvohra) #4

No, the base operating system must be supported by Machine and Amazon Linux AMI is not. Use Ubuntu LTS.

(Mike0109) #5

Will UCP have this same problem?

(Dvohra) #6

Yes. Should be Ubuntu.