2014-02-07 16:09:50 +00:00
|
|
|
class Docker < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Pack, ship and run any application as a lightweight container"
|
2014-10-16 19:22:31 +00:00
|
|
|
homepage "https://www.docker.com/"
|
2016-01-17 15:03:08 +00:00
|
|
|
url "https://github.com/docker/docker.git",
|
2016-06-02 03:27:23 +00:00
|
|
|
:tag => "v1.11.2",
|
|
|
|
:revision => "b9f10c951893f9a00865890a5232e85d770c1087"
|
2016-01-17 15:03:08 +00:00
|
|
|
|
2015-06-28 00:50:12 +00:00
|
|
|
head "https://github.com/docker/docker.git"
|
2014-04-10 05:24:29 +00:00
|
|
|
|
2014-06-13 13:45:11 +00:00
|
|
|
bottle do
|
2015-09-13 08:52:38 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-06-02 03:54:55 +00:00
|
|
|
sha256 "85376c2591bb8e87981608764ee34d94b2341b6dd428fe75a415af0fd3be64d9" => :el_capitan
|
|
|
|
sha256 "44a84556a9d7ab7d631f847e3f761a09db9f0e1fffa9e7e9a341c27f0ead4be3" => :yosemite
|
|
|
|
sha256 "5d4657dfcebd6d2e1fe59fe6487f6fe54ed9f6971969ccc0b93088e70d3c9633" => :mavericks
|
2014-06-13 13:45:11 +00:00
|
|
|
end
|
|
|
|
|
2015-06-27 06:25:20 +00:00
|
|
|
option "with-experimental", "Enable experimental features"
|
2014-02-13 20:17:06 +00:00
|
|
|
option "without-completions", "Disable bash/zsh completions"
|
2014-02-12 12:10:52 +00:00
|
|
|
|
2014-02-07 16:09:50 +00:00
|
|
|
depends_on "go" => :build
|
2016-04-04 21:48:12 +00:00
|
|
|
|
|
|
|
if build.with? "experimental"
|
|
|
|
depends_on "libtool" => :run
|
|
|
|
depends_on "yubico-piv-tool" => :recommended
|
|
|
|
end
|
2014-02-07 16:09:50 +00:00
|
|
|
|
|
|
|
def install
|
2014-02-10 18:56:33 +00:00
|
|
|
ENV["AUTO_GOPATH"] = "1"
|
2014-03-11 14:51:29 +00:00
|
|
|
ENV["DOCKER_CLIENTONLY"] = "1"
|
2015-06-27 06:25:20 +00:00
|
|
|
ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental"
|
2014-02-07 16:09:50 +00:00
|
|
|
|
|
|
|
system "hack/make.sh", "dynbinary"
|
2015-06-28 00:50:12 +00:00
|
|
|
|
|
|
|
build_version = build.head? ? File.read("VERSION").chomp : version
|
|
|
|
bin.install "bundles/#{build_version}/dynbinary/docker-#{build_version}" => "docker"
|
2014-02-12 12:10:52 +00:00
|
|
|
|
2014-02-13 20:17:06 +00:00
|
|
|
if build.with? "completions"
|
|
|
|
bash_completion.install "contrib/completion/bash/docker"
|
2015-10-14 12:12:17 +00:00
|
|
|
fish_completion.install "contrib/completion/fish/docker.fish"
|
2014-02-13 20:17:06 +00:00
|
|
|
zsh_completion.install "contrib/completion/zsh/_docker"
|
2014-02-12 12:10:52 +00:00
|
|
|
end
|
2014-02-07 16:09:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/docker", "--version"
|
|
|
|
end
|
|
|
|
end
|