Created
September 15, 2015 06:20
-
-
Save hitsujiwool/81fcab49f9ccf8ac5835 to your computer and use it in GitHub Desktop.
docker + docker-compose on Amazon Linux
This file contains hidden or 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
{ | |
"variables": { | |
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}", | |
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}" | |
}, | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"ssh_pty": true, | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "ap-northeast-1", | |
"source_ami": "ami-1c1b9f1c", | |
"instance_type": "t2.micro", | |
"ssh_username": "ec2-user", | |
"ami_name": "docker" | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"sudo yum install -y docker", | |
"sudo usermod -a -G docker ec2-user", | |
"sudo curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose > /dev/null", | |
"sudo chmod +x /usr/local/bin/docker-compose" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't get you the latest version of Docker Compose, plus you should use the "/usr/bin" directory as the "/usr/local/bin" directory is not included in AWS Path.