-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
37 lines (36 loc) · 961 Bytes
/
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
{
"min_packer_version": "1.10.0",
"variables": {
"distro_name": "{{env `DISTRO_NAME`}}",
"distro_version": "{{env `DISTRO_VERSION`}}",
"distro_codename": "{{env `DISTRO_CODENAME`}}",
"output_dir": "/workspace/dist/{{user `distro_codename`}}",
"source_dest": "/tmp/source"
},
"builders": [
{
"type": "docker",
"image": "{{user `distro_name`}}:{{user `distro_version`}}",
"privileged": true,
"discard": true,
"volumes": { "{{pwd}}/": "/workspace"}
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"DISTRO_NAME={{user `distro_name`}}",
"UBUNTU_RELVER={{user `distro_version`}}",
"UBUNTU_CODENAME={{user `distro_codename`}}",
"OUTPUT_DIR={{user `output_dir`}}",
"VENDOR='{{user `vendor`}}'"
],
"scripts": [
"scripts/setup.sh",
"scripts/build.sh"
]
}
]
}