Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,28 @@ Codename: trusty

## Install

Install latest version using Golang (recommended)

```console
$ go get github.com/moul/ssh2docker/...
```

---

Install latest version using Homebrew (Mac OS X)

```console
$ brew install https://raw.githubusercontent.com/moul/ssh2docker/master/contrib/homebrew/assh.rb --HEAD

```

or the latest released version

```console
$ brew install https://raw.githubusercontent.com/moul/ssh2docker/master/contrib/homebrew/assh.rb

```

## Usage

```
Expand Down
33 changes: 33 additions & 0 deletions contrib/homebrew/ssh2docker.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require "language/go"

class Ssh2docker < Formula
desc "SSH server that creates a Docker container per connection (chroot++)"
homepage "https://github.com/moul/ssh2docker"
url "https://github.com/moul/ssh2docker/archive/v1.0.1.tar.gz"
sha256 "8ff5355f7c0970433f7c5d1ff1a8ce9467e78c2011f4b886d4dca05d68b36786"

head "https://github.com/moul/ssh2docker.git"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
ENV["CGO_ENABLED"] = "0"
ENV.prepend_create_path "PATH", buildpath/"bin"

mkdir_p buildpath/"src/github.com/moul"
ln_s buildpath, buildpath/"src/github.com/moul/ssh2docker"
Language::Go.stage_deps resources, buildpath/"src"

# FIXME: update version
system "go", "build", "-o", "ssh2docker", "./cmd/ssh2docker"
bin.install "ssh2docker"

# FIXME: add autocompletion
end

test do
output = shell_output(bin/"ssh2docker --version")
assert output.include? "ssh2docker version"
end
end