Merge pull request #2915 from jeanlaurent/fix-985

FIX #494 - Use same binary filename scheme as other docker-project
This commit is contained in:
David Gageot 2016-01-25 15:36:42 +01:00
commit a9cbd71d94
3 changed files with 28 additions and 29 deletions

View File

@ -30,26 +30,23 @@ instructions in the next section.
2. Download the Docker Machine binary and extract it to your PATH. 2. Download the Docker Machine binary and extract it to your PATH.
Linux: If you are running OS X or Linux:
$ curl -L https://github.com/docker/machine/releases/download/v0.5.5/docker-machine_linux-amd64 >/usr/local/bin/docker-machine && \ $ curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine chmod +x /usr/local/bin/docker-machine
OSX: If you are running Windows with git bash
$ curl -L https://github.com/docker/machine/releases/download/v0.5.5/docker-machine_darwin-amd64 >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
Windows (using Git Bash):
$ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \ $ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \
curl -L https://github.com/docker/machine/releases/download/v0.5.5/docker-machine_windows-amd64.exe > "$HOME/bin/docker-machine.exe" && \ curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && \
chmod +x "$HOME/bin/docker-machine.exe" chmod +x "$HOME/bin/docker-machine.exe"
Otherwise, download one of the releases from the [release page](https://github.com/docker/machine/releases/) directly.
3. Check the installation by displaying the Machine version: 3. Check the installation by displaying the Machine version:
$ docker-machine version $ docker-machine version
docker-machine version 0.5.5, build 02c4254 docker-machine version 0.6.0, build 61388e9
## Installing bash completion scripts ## Installing bash completion scripts

View File

@ -3,11 +3,18 @@ extension = $(patsubst windows,.exe,$(filter windows,$(1)))
# Valid target combinations # Valid target combinations
VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]" VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]"
os.darwin := Darwin
os.linux := Linux
os.windows := Windows
arch.amd64 := x86_64
arch.386 := i386
define gocross define gocross
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \ $(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \ GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
$(GO) build \ $(GO) build \
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \ -o $(PREFIX)/bin/docker-machine-${os.$(1)}-${arch.$(2)}$(call extension,$(GOOS)) \
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \ -a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;) -ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
endef endef

View File

@ -1,30 +1,25 @@
## Installation ## Installation
1. Download the file for your OS and architecture. If you're a Mac or Windows user, the [Docker Toolbox](https://www.docker.com/docker-toolbox) will install Docker Machine {{VERSION}} for you, alongside the latest versions of the Docker Engine, Compose and Kitematic.
2. Move the binary to your PATH.
e.g., for Mac OSX: You can use the usual commands to install or upgrade:
On OS X or Linux
```console ```console
$ curl -L https://github.com/docker/machine/releases/download/{{VERSION}}/docker-machine_darwin-amd64 >/usr/local/bin/docker-machine && \ $ curl -L https://github.com/docker/machine/releases/download/{{VERSION}}/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine chmod +x /usr/local/bin/docker-machine
``` ```
On Windows with git bash
Linux:
```console
$ curl -L https://github.com/docker/machine/releases/download/{{VERSION}}/docker-machine_linux-amd64 >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
```
Windows (using [git bash](https://git-for-windows.github.io/)):
```console ```console
$ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \ $ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \
curl -L https://github.com/docker/machine/releases/download/{{VERSION}}/docker-machine_windows-amd64.exe > "$HOME/bin/docker-machine.exe" && \ curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && \
chmod +x "$HOME/bin/docker-machine.exe" chmod +x "$HOME/bin/docker-machine.exe"
``` ```
Otherwise, download one of the releases from the [release page](https://github.com/docker/machine/releases/) directly.
See the install [docs](https://docs.docker.com/machine/install-machine/) for more install options and instructions.
## Changelog ## Changelog
*Edit the changelog below by hand* *Edit the changelog below by hand*