Docking Machine Integration with Amazon EC2

I am reading this article which shows me how I can configure my docker virtual machine on top of amazon ec2

https://docs.docker.com/machine/drivers/aws/

I got to the step

docker-machine create --driver amazonec2 aws01

but now i get an error

Error with pre-create check: "unable to find a subnet in the zone: us-east-1a"

I googled and found this thread

https://github.com/docker/machine/issues/1771

but found something that worked for me.

Has anyone been able to successfully create a virtual machine on top of AWS using a docker machine?

+4
source share
1 answer

I decided it myself. the answer is here

first do

aws configure

This will ask you some questions, such as security identifier and key. You should get this information from the aws control panel.

aws ec2 describe-subnets

. AvailabilityZone Id

docker-machine create --driver amazonec2 --amazonec2-subnet-id=xxxx --amazonec2-zone=c aws01

, , ( us-east-1c c)

Running pre-create checks...
Creating machine...
(aws01) Launching instance...
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...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env aws01
+8

All Articles