-
-
Save gregtaylor99/6f65c129634788a577a53e11d09fca3a to your computer and use it in GitHub Desktop.
build your docker-machine on AWS EC2 instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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