Skip to content

Instantly share code, notes, and snippets.

@mainyaa
Last active August 29, 2015 13:56
Show Gist options
  • Save mainyaa/8862012 to your computer and use it in GitHub Desktop.
Save mainyaa/8862012 to your computer and use it in GitHub Desktop.
Docker v0.8.0 Fomula for HomeBrew
require 'formula'
class Docker < Formula
homepage 'http://docker.io/'
url 'https://github.com/dotcloud/docker/archive/v0.8.0.tar.gz'
sha1 '1e9362dab2ac2ecb4a1f193a7e72d060000438c3'
depends_on 'go' => :build
depends_on 'mercurial' => :build
def install
ENV['GOPATH'] = buildpath/'vendor'
ENV['DOCKER_GITCOMMIT'] = 'cc3a8c8d8ec57e15b7b7316797132d770408ab1a'
ENV['DOCKER_CROSSPLATFORMS'] = 'darwin/amd64 darwin/386'
system './hack/vendor.sh'
system './hack/make.sh'
system 'cp', 'builds/Darwin/x86_64/docker-0.8.0', 'builds/Darwin/x86_64/docker'
bin.install 'builds/Darwin/x86_64/docker'
end
test do
system bin'/docker', '-v'
(testpath/'Test.file').write <<-EOS.undent
Docker version 0.8.0, build cc3a8c8
EOS
assert_equal 'OK', ` test.file`.strip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment