From 9306ed430501685de198e2b7e1822ddc8c6d19ff Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 1 Oct 2017 08:24:15 -0700 Subject: [PATCH] box: build a 'thick' image to ensure image caching --- box.rb | 10 ++++++---- mage.go | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/box.rb b/box.rb index 4a17c95..316b5e6 100644 --- a/box.rb +++ b/box.rb @@ -19,10 +19,12 @@ run "go build -v #{$repoPath}/cmd/... && go install -v #{$repoPath}/cmd/..." run "apk del build-base" [ - ["route-cli", "route-cli"], - ["routed", "routed"], - ["route-httpagent", "route-httpagent"], -].each { |x| run "cp /root/go/bin/#{x[0]} /usr/local/bin/#{x[1]}" } + "route-cli", + "routed", + "route-httpagent", +].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" flatten diff --git a/mage.go b/mage.go index 7b93c2a..45a7fcb 100644 --- a/mage.go +++ b/mage.go @@ -117,6 +117,7 @@ func Docker() { 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:thick", "xena/route:thick-"+ver) } // Linux builds binaries for linux