Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

add brew installation and real check docker client version #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,29 @@ or curl:
curl https://raw.githubusercontent.com/noplay/docker-osx/HEAD/docker-osx > /usr/local/bin/docker-osx
chmod +x /usr/local/bin/docker-osx

or brew:
brew create curl https://raw.githubusercontent.com/noplay/docker-osx/HEAD/docker-osx --set-name docker-osx

```ruby
require "formula"

class DockerOsx < Formula
homepage "https://github.com/noplay/docker-osx.git"
url "https://raw.githubusercontent.com/noplay/docker-osx/HEAD/docker-osx"

depends_on "docker"

def install
bin.install "docker-osx"
end

test do
system "docker-osx"
end
end
```

brew install docker-osx
3. Run:

docker-osx shell
Expand Down
6 changes: 3 additions & 3 deletions docker-osx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ function start_vm() {

# Determine currently installed version of Docker
INSTALLED_DOCKER_VERSION=""
if [ -f "$VAGRANT_CWD/.docker-version" ]
if [ -f "$DOCKER_BIN" ]
then
INSTALLED_DOCKER_VERSION=`cat "$VAGRANT_CWD/.docker-version"`
INSTALLED_DOCKER_VERSION=`$DOCKER_BIN -v | grep -oE "[0-9]+\.[0-9]+\.[0-9]"`
fi

# Check that dependencies are installed
Expand Down Expand Up @@ -176,7 +176,7 @@ fi


# Set current installed Docker version
echo $DOCKER_VERSION > $VAGRANT_CWD/.docker-version
#echo $DOCKER_VERSION > $VAGRANT_CWD/.docker-version

case "$1" in
up|start)
Expand Down