Docker Community Forums

Share and learn in the Docker community.

Docker-machine add existing amazon instance

aws

(Mike0109) #1

Hi,

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=10.0.0.126 --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"
VERSION="2016.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2016.03"
PRETTY_NAME="Amazon Linux AMI 2016.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2016.03:ga"
HOME_URL=“http://aws.amazon.com/amazon-linux-ami/

Is there an existing fix for this?

Thanks


(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.