homebrew-core/Formula/docker.rb
2016-02-05 14:46:12 +00:00

42 lines
1.4 KiB
Ruby

class Docker < Formula
desc "Pack, ship and run any application as a lightweight container"
homepage "https://www.docker.com/"
url "https://github.com/docker/docker.git",
:tag => "v1.10.0",
:revision => "590d5108bbdaabb05af590f76c9757daceb6d02e"
head "https://github.com/docker/docker.git"
bottle do
cellar :any_skip_relocation
sha256 "37c32d6b8d28691b13f0d9ff5b8043e80a3264a2d6216aa57162cc750ba9d05f" => :el_capitan
sha256 "359afd5526a7d827ce63a96932ae0747c06c96a72fc644f897e07d6d32757dad" => :yosemite
sha256 "71589e5bbbae4763752b99d60b127da1010d38f07a60c361f16bf9a65d85f156" => :mavericks
end
option "with-experimental", "Enable experimental features"
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
def install
ENV["AUTO_GOPATH"] = "1"
ENV["DOCKER_CLIENTONLY"] = "1"
ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental"
system "hack/make.sh", "dynbinary"
build_version = build.head? ? File.read("VERSION").chomp : version
bin.install "bundles/#{build_version}/dynbinary/docker-#{build_version}" => "docker"
if build.with? "completions"
bash_completion.install "contrib/completion/bash/docker"
fish_completion.install "contrib/completion/fish/docker.fish"
zsh_completion.install "contrib/completion/zsh/_docker"
end
end
test do
system "#{bin}/docker", "--version"
end
end