box: build a 'thick' image to ensure image caching

This commit is contained in:
Cadey Ratio 2017-10-01 08:24:15 -07:00
parent f941226816
commit 9306ed4305
No known key found for this signature in database
GPG Key ID: D607EE27C2E7F89A
2 changed files with 7 additions and 4 deletions

10
box.rb
View File

@ -19,10 +19,12 @@ run "go build -v #{$repoPath}/cmd/... && go install -v #{$repoPath}/cmd/..."
run "apk del build-base" run "apk del build-base"
[ [
["route-cli", "route-cli"], "route-cli",
["routed", "routed"], "routed",
["route-httpagent", "route-httpagent"], "route-httpagent",
].each { |x| run "cp /root/go/bin/#{x[0]} /usr/local/bin/#{x[1]}" } ].each { |x| run "cp /root/go/bin/#{x} /usr/local/bin/#{x}" }
tag "xena/route:thick"
run "apk del go1.9 && rm -rf /root/sdk /root/go" run "apk del go1.9 && rm -rf /root/sdk /root/go"
flatten flatten

View File

@ -117,6 +117,7 @@ func Docker() {
shouldWork(ctx, nil, wd, "box", "box.rb") shouldWork(ctx, nil, wd, "box", "box.rb")
shouldWork(ctx, nil, wd, "docker", "tag", "xena/route:latest", "xena/route:"+ver) shouldWork(ctx, nil, wd, "docker", "tag", "xena/route:latest", "xena/route:"+ver)
shouldWork(ctx, nil, wd, "docker", "tag", "xena/route:thick", "xena/route:thick-"+ver)
} }
// Linux builds binaries for linux // Linux builds binaries for linux