2017-09-30 20:17:50 +00:00
|
|
|
$goVer = "1.9"
|
|
|
|
$repoPath = "git.xeserv.us/xena/route"
|
|
|
|
|
|
|
|
from "xena/go-mini:#{$goVer}"
|
|
|
|
|
|
|
|
run "go download"
|
|
|
|
|
|
|
|
[
|
|
|
|
"vendor",
|
|
|
|
"internal",
|
|
|
|
"proto",
|
|
|
|
"cmd",
|
|
|
|
"plugins",
|
|
|
|
"doc",
|
|
|
|
].each { |x| copy x+"/", "/root/go/src/#{$repoPath}/#{x}" }
|
|
|
|
|
|
|
|
run "apk --no-cache add build-base"
|
|
|
|
run "go build -v #{$repoPath}/cmd/... && go install -v #{$repoPath}/cmd/..."
|
|
|
|
run "apk del build-base"
|
|
|
|
|
|
|
|
[
|
2017-10-01 15:24:15 +00:00
|
|
|
"route-cli",
|
|
|
|
"routed",
|
|
|
|
"route-httpagent",
|
|
|
|
].each { |x| run "cp /root/go/bin/#{x} /usr/local/bin/#{x}" }
|
|
|
|
|
|
|
|
tag "xena/route:thick"
|
2017-09-30 20:17:50 +00:00
|
|
|
|
|
|
|
run "apk del go1.9 && rm -rf /root/sdk /root/go"
|
|
|
|
flatten
|
|
|
|
|
|
|
|
tag "xena/route:latest"
|