route/box.rb

31 lines
607 B
Ruby
Raw Normal View History

2017-12-03 02:43:59 +00:00
$goVer = "1.9.2"
2017-09-30 20:17:50 +00:00
$repoPath = "git.xeserv.us/xena/route"
from "xena/go-mini:#{$goVer}"
2017-12-03 02:43:59 +00:00
run "go#{$goVer} download"
2017-09-30 20:17:50 +00:00
[
"vendor",
"internal",
"proto",
"cmd",
].each { |x| copy x+"/", "/root/go/src/#{$repoPath}/#{x}" }
run "apk --no-cache add build-base"
2017-12-03 02:43:59 +00:00
run "go#{$goVer} build -v #{$repoPath}/cmd/... && go#{$goVer} install -v #{$repoPath}/cmd/..."
2017-09-30 20:17:50 +00:00
run "apk del build-base"
[
"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
2017-12-03 02:43:59 +00:00
run "apk del go#{$goVer} && rm -rf /root/sdk /root/go"
2017-09-30 20:17:50 +00:00
flatten
tag "xena/route:latest"