-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json
41 lines (41 loc) · 1.05 KB
/
packer.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
{
"variables": {
"packer_image": "",
"digitalOceanToken": ""
},
"builders": [
{
"type": "digitalocean",
"api_token": "{{user `digitalOceanToken`}}",
"image": "ubuntu-17-04-x64",
"droplet_name": "packer-{{uuid}}",
"region": "sfo1",
"size": "512mb",
"ssh_username": "root",
"snapshot_name": "dockerbase-{{timestamp}}",
"snapshot_regions": ["sfo1", "sfo2"]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -",
"curl -sSL https://agent.digitalocean.com/install.sh | sh",
"add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"",
"apt-get update",
"apt-get install -y docker-ce"
]
}
],
"post-processors": [
{
"type": "atlas",
"artifact": "{{user `packer_image`}}",
"artifact_type": "digitalocean.image",
"metadata": {
"created_at": "{{timestamp}}"
}
}
]
}