Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
build your docker-machine on AWS EC2 instance
#!/bin/bash
machine='docker-builder'
export AWS_PROFILE='pahud'
AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
VPC='vpc-xxxxxx'
docker-machine create --driver amazonec2 \
--amazonec2-region us-west-2 \
--amazonec2-vpc-id ${VPC:-""} \
--amazonec2-request-spot-instance \
--amazonec2-spot-price 0.02 \
--amazonec2-instance-type m3.medium \
--amazonec2-access-key ${AWS_ACCESS_KEY_ID} \
--amazonec2-secret-key ${AWS_SECRET_ACCESS_KEY} \
$machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.