forked from mitchellh/boot2docker-vagrant-box
-
Notifications
You must be signed in to change notification settings - Fork 16
/
template.json
86 lines (79 loc) · 3.06 KB
/
template.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
85
86
{
"builders": [{
"name": "virtualbox",
"type": "virtualbox-iso",
"iso_url": "boot2docker.iso",
"iso_checksum": "92e9d0fa63463f9411a08860f7ea68e1",
"iso_checksum_type": "md5",
"boot_wait": "5s",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff",
"guest_additions_mode": "disable",
"guest_os_type": "Linux26_64",
"disk_size": 40960,
"hard_drive_interface": "sata",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "512"],
["modifyvm", "{{.Name}}", "--nictype1", "virtio"],
["modifyvm", "{{.Name}}", "--nictype2", "virtio"],
["modifyvm", "{{.Name}}", "--nictype3", "virtio"],
["modifyvm", "{{.Name}}", "--nictype4", "virtio"],
["modifyvm", "{{.Name}}", "--nictype5", "virtio"],
["modifyvm", "{{.Name}}", "--nictype6", "virtio"],
["modifyvm", "{{.Name}}", "--nictype7", "virtio"],
["modifyvm", "{{.Name}}", "--nictype8", "virtio"]
]
}, {
"name": "parallels",
"type": "parallels-iso",
"iso_url": "boot2docker.iso",
"iso_checksum": "92e9d0fa63463f9411a08860f7ea68e1",
"iso_checksum_type": "md5",
"boot_wait": "15s",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff",
"guest_os_type": "linux",
"guest_os_distribution": "linux-2.6",
"prlctl": [
["set", "{{.Name}}", "--memsize", "512"]
]
}],
"provisioners": [{
"type": "shell",
"inline": [
"(echo n; echo p; echo 2; echo ; echo +1000M ; echo w) | sudo fdisk /dev/sda",
"(echo t; echo 82) | sudo fdisk /dev/sda",
"sudo mkswap /dev/sda2",
"(echo n; echo p; echo 1; echo ; echo ; echo w;) | sudo fdisk /dev/sda",
"sudo mkfs.ext4 -F -L boot2docker-data /dev/sda1",
"sudo swapon /dev/sda2",
"sudo /usr/local/etc/init.d/docker stop",
"sudo /etc/rc.d/automount",
"mkdir -p /tmp/boot2docker"
]
}, {
"type": "file",
"source": "files/",
"destination": "/tmp/boot2docker"
}, {
"type": "shell",
"inline": [
"sudo cp /tmp/boot2docker/oem-release /var/lib/boot2docker/",
"sudo cp /tmp/boot2docker/bootsync.sh /var/lib/boot2docker/",
"sudo chmod +x /var/lib/boot2docker/bootsync.sh",
"sudo cp /tmp/boot2docker/bootlocal.sh /var/lib/boot2docker/",
"sudo chmod +x /var/lib/boot2docker/bootlocal.sh",
"sudo mkdir -p /var/lib/boot2docker/bin",
"sudo cp /tmp/boot2docker/docker-enter /var/lib/boot2docker/bin/",
"sudo chmod +x /var/lib/boot2docker/bin/docker-enter"
]
}],
"post-processors": [{
"type": "vagrant",
"include": ["boot2docker.iso"],
"vagrantfile_template": "vagrantfile.tpl",
"output": "boot2docker-{{.Provider}}.box"
}]
}