-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacker.json
More file actions
63 lines (63 loc) · 1.32 KB
/
packer.json
File metadata and controls
63 lines (63 loc) · 1.32 KB
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
{
"variables": {
"node_version": "12.15.0",
"app_dir_root": "/opt/app",
"app_version": "1.0.2"
},
"builders": [
{
"type": "docker",
"image": "arm32v7/node:{{ user `node_version` }}",
"commit": "true",
"run_command": [
"-d",
"-i",
"-t",
"-v", "/usr/include/matrix_hal:/usr/include/matrix_hal",
"-v", "/usr/lib/libmatrix_creator_hal.so:/usr/lib/libmatrix_creator_hal.so",
"{{.Image}}"
],
"changes": [
"CMD [\"node\", \"{{ user `app_dir_root` }}/index.js\"]"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"mkdir -p {{ user `app_dir_root` }}"
]
},
{
"type": "shell",
"inline": [
"apt-get update",
"apt-get install -y libfftw3-3",
"apt-get clean"
]
},
{
"type": "file",
"source": "./app/",
"destination": "{{ user `app_dir_root` }}"
},
{
"type": "shell",
"inline": [
"cd {{ user `app_dir_root` }}",
"rm -rf node_modules",
"rm -rf test",
"npm install --production",
"ls -l"
]
}
],
"post-processors": [
{
"type": "docker-tag",
"repository": "cdmnky/matrix-everloop",
"tag": "{{ user `app_version` }}-arm32v7"
}
]
}