-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathami_ubuntu_1804_docker_1903.json
42 lines (42 loc) · 1.19 KB
/
ami_ubuntu_1804_docker_1903.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"variables": {
"name": "ubuntu_1804_docker_1903_packer",
"source_ami": "ami-04b9e92b5572fa0d1",
"access_key":"",
"secret_key":"",
"region":"us-east-1"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"secret_key":"{{user `secret_key`}}",
"ami_name": "{{user `name`}}",
"region": "{{user `region`}}",
"ami_regions": [
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2"
],
"source_ami": "{{user `source_ami`}}",
"instance_type": "t2.medium",
"communicator": "ssh",
"ssh_username": "ubuntu",
"force_deregister": true,
"run_tags":{"Name":"packer-image"}
}],
"provisioners": [
{
"type": "shell",
"inline": "sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean -y && sudo apt autoclean -y"
},
{
"type": "shell",
"inline": ["curl https://releases.rancher.com/install-docker/19.03.sh | sh"]
},
{
"type": "shell",
"inline": ["sudo usermod -aG docker ubuntu"]
}
]
}