-
Notifications
You must be signed in to change notification settings - Fork 12
/
Boxfile
42 lines (23 loc) · 724 Bytes
/
Boxfile
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
from "golang:1.8.0-alpine"
import_path = "github.com/errordeveloper/kubegen"
path = "/go/src/#{import_path}"
run "apk update"
build_deps_core = "make gcc"
build_deps_misc = "libc-dev dev86 pcre-dev"
runtime_deps = "pcre"
make_test_cmds = "make -C #{path} test-cmds"
run "apk add #{build_deps_core} #{build_deps_misc}"
copy ".", path
run "go install -v #{import_path}/cmd/kubegen"
run make_test_cmds
run "apk del #{build_deps_misc}"
run "apk add #{runtime_deps}"
run make_test_cmds
run "apk del #{build_deps_core}"
run "mv /go/bin/kubegen /usr/bin"
run "mv #{path}/examples /"
workdir "/examples"
run "rm -rf /go /usr/local"
set_exec entrypoint: [ "kubegen" ], cmd: []
flatten
tag "errordeveloper/kubegen"