-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvatic_packer.json
84 lines (79 loc) · 2.29 KB
/
vatic_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"variables": {
"docker_username": null,
"docker_password": null,
"version_number":null
},
"builders": [
{
"type": "docker",
"image": "ubuntu:trusty",
"commit": true,
"changes": [
"WORKDIR /home/vagrant"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [ "sleep 30" ]
},
{
"type": "shell",
"inline": [
"mkdir -p /home/vagrant",
"chmod 777 /home/vagrant",
"sed -i 's#root:/root#root:/home/vagrant#' /etc/passwd",
"echo '#!/bin/sh' > /usr/sbin/policy-rc.d",
"echo 'exit 0' >> /usr/sbin/policy-rc.d",
"sudo apt-get update",
"sudo apt-get install -y wget"
]
},
{
"type": "file",
"source": "start_services.sh",
"destination": "/home/vagrant/start_services.sh"
},
{
"type": "shell",
"environment_vars":["INSTALL_WITH_EXAMPLE_DATA=false", "HOME=/home/vagrant"],
"execute_command":"/bin/bash -c 'cd /home/vagrant && {{ .Vars }} {{ .Path }}'",
"script": "vatic/vatic-install.sh"
},
{
"type": "shell",
"environment_vars":["HOME=/home/vagrant"],
"script": "finish_docker_install.sh"
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "jldowns/vatic-docker-contrib",
"tag": "{{user `version_number`}}"
},
{
"type": "docker-push",
"login": true,
"login_username": "{{user `docker_username`}}",
"login_password": "{{user `docker_password`}}"
}
],
[
{
"type": "docker-tag",
"repository": "jldowns/vatic-docker-contrib",
"tag": "latest"
},
{
"type": "docker-push",
"login": true,
"login_username": "{{user `docker_username`}}",
"login_password": "{{user `docker_password`}}"
}
]
]
}