homebrew-core/Formula/docker.rb

41 lines
1.4 KiB
Ruby
Raw Normal View History

class Docker < Formula
desc "Pack, ship and run any application as a lightweight container"
2014-10-16 19:22:31 +00:00
homepage "https://www.docker.com/"
2015-11-20 22:10:35 +00:00
url "https://github.com/docker/docker.git", :tag => "v1.9.1",
:revision => "a34a1d598c6096ed8b5ce5219e77d68e5cd85462"
2015-06-28 00:50:12 +00:00
head "https://github.com/docker/docker.git"
bottle do
2015-09-13 08:52:38 +00:00
cellar :any_skip_relocation
2015-11-21 00:51:25 +00:00
sha256 "95dd6bae779945643e3380035fcee5aee3899c3c6eccf6573c0e5f119f91e0de" => :el_capitan
sha256 "2e4d8fa1a23b98f5709b19173736a5c8742a29025d35695f8585298c531e52cf" => :yosemite
sha256 "4033ae90e80faf0eae197e753f94d4b26461285ead526a3330ffc989cb283ef7" => :mavericks
end
option "with-experimental", "Enable experimental features"
2014-02-13 20:17:06 +00:00
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
def install
ENV["AUTO_GOPATH"] = "1"
2014-03-11 14:51:29 +00:00
ENV["DOCKER_CLIENTONLY"] = "1"
ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental"
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-13 20:17:06 +00:00
if build.with? "completions"
bash_completion.install "contrib/completion/bash/docker"
fish_completion.install "contrib/completion/fish/docker.fish"
2014-02-13 20:17:06 +00:00
zsh_completion.install "contrib/completion/zsh/_docker"
end
end
test do
system "#{bin}/docker", "--version"
end
end