Created
October 13, 2016 02:19
-
-
Save erikh/cd21b382c5360bfec8d913ee32245c7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from "golang" | |
packages = %w[ | |
build-essential | |
g++ | |
git | |
wget | |
curl | |
ruby | |
bison | |
flex | |
iptables | |
psmisc | |
] | |
run "apt-get update" | |
run "apt-get install -y #{packages.join(" ")}" | |
env "GOPATH" => "/go" | |
if getenv("RELEASE") == "" | |
run "wget https://get.docker.com/builds/Linux/x86_64/docker-1.12.1.tgz" | |
run "tar -xpf docker-1.12.1.tgz --strip-components=1 -C /usr/bin/" | |
run "rm docker-1.12.1.tgz" | |
copy "dind", "/dind" | |
end | |
copy ".", "/go/src/github.com/erikh/box" | |
if getenv("IGNORE_LIBMRUBY") == "" | |
run "cd /go/src/github.com/erikh/box && make" | |
end | |
if getenv("RELEASE") != "" | |
run "mv /go/bin/box /box" | |
entrypoint "/box" | |
run "apt-get purge -y #{packages.join(" ")}" | |
run "apt-get autoclean" | |
run "rm -rf /usr/local /go /var/cache/apt /var/lib/apt" | |
flatten | |
tag "erikh/box:latest" | |
else | |
workdir "/go/src/github.com/erikh/box" | |
entrypoint "/dind" | |
tag "box-test" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment