homebrew-core/Formula/docker.rb

40 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/"
url "https://github.com/docker/docker.git", :tag => "v1.8.0",
:revision => "0d03096b65d12b11082e496ffdd824ff356f3fed"
2015-06-28 00:50:12 +00:00
head "https://github.com/docker/docker.git"
bottle do
2015-02-20 15:36:44 +00:00
cellar :any
2015-08-11 23:02:03 +00:00
sha256 "582ad19dc9f256d86e1b06ef0003cb6f2649bbd65e78d177b87f95e1fe474b6e" => :yosemite
sha256 "4be7094557cfd607fee1cb1052407cbe94df2fef6ae452a7dbe16c946d35aa48" => :mavericks
sha256 "5bfe9725910302068b7e47be7da53052920ba1a5ef163c38091fcc8e41d89d43" => :mountain_lion
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"
zsh_completion.install "contrib/completion/zsh/_docker"
end
end
test do
system "#{bin}/docker", "--version"
end
end