Skip to content

Instantly share code, notes, and snippets.

@beldpro-ci
Created May 3, 2017 20:40
Show Gist options
  • Save beldpro-ci/67b0201427518c2237cd873410057d9a to your computer and use it in GitHub Desktop.
Save beldpro-ci/67b0201427518c2237cd873410057d9a to your computer and use it in GitHub Desktop.
Docker-enabled AMI
{
"variables": {
"aws_access_key": "<access_key>",
"aws_secret_key": "<secret_key>"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "sa-east-1",
"source_ami": "ami-9595f8f9",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "beld-myami-v1"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt update -y",
"sudo apt upgrade -y",
"curl -fsSL https://test.docker.com/ | sudo sh",
"sudo usermod -aG docker ubuntu",
"sudo apt install python python-pip vim jq silversearcher-ag -y",
"sudo pip install docker-compose"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment