-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJockerfile
43 lines (40 loc) · 1.24 KB
/
Jockerfile
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
#syntax=ghcr.io/jocker-org/jocker
local std = import "std.libsonnet";
{
"stages": [
{
"name": "builder",
"from": "alpine:latest",
"steps": [
std.stage.step.workdir("/src"),
// {"type": "WORKDIR", "path": "/src"},
{"type": "RUN", "command": "apk update"},
{"type": "RUN", "command": "apk upgrade"},
{"type": "RUN", "command": "apk add mkdocs"},
{"type": "COPY", "src": "mkdocs.yml", "dst": "/src"},
{"type": "COPY", "src": "./docs", "dst": "/src/docs"},
{"type": "RUN", "command": "mkdocs build"}
]
},
{
"name": "server",
"from": "alpine:latest",
"steps": [
{"type": "RUN", "command": "addgroup -g 1000 app && adduser -G app -u 1000 app -D"},
{"type": "RUN", "command": "apk update"},
{"type": "RUN", "command": "apk upgrade"},
{"type": "RUN", "command": "apk add darkhttpd"},
{"type": "COPY", "from": "builder", "src": "/src/site", "dst": "/www"},
{"type": "USER", "user": "1000"},
],
},
],
"image": {
"Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],
"Cmd": ["darkhttpd", "/www"],
},
"excludes" : ["*", "!docs", "!mkdocs.yml"],
}
// Local Variables:
// mode: jsonnet
// End: