From a82d2cd74dc96b232514bb51d8e1ce9eb1d64241 Mon Sep 17 00:00:00 2001 From: gdm85 Date: Thu, 8 Oct 2015 13:05:48 +0200 Subject: [PATCH 1/2] Explain how to prepare a Go 1.5 development environment Other minor documentation fixes Signed-off-by: Giuseppe Mazzotta --- CONTRIBUTING.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 844268e75a..03b27064ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,29 +14,40 @@ Docker does things, you'll feel right at home. Otherwise, please read [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md). -# Building using docker +# Building The requirements to build Machine are: -1. A running instance of Docker +1. A running instance of Docker or a Golang 1.5 development environment 2. The `bash` shell 3. [Make](https://www.gnu.org/software/make/) -Call `export USE_CONTAINER=true` to instruct the build system to use containers to build. +## Build using Docker containers -# Alternative: build using go only +To build the `docker-machine` binary using containers, simply run: -Alternatively, you can build without docker, using only golang. + $ export USE_CONTAINER=true + $ make build -[Install and setup go](https://golang.org/doc/install), then clone the machine repository inside your gopath. +## Local Go 1.5 development environment -## Building +Make sure the source code directory is under a correct directory structure to use Go 1.5 vendoring; +example of cloning and preparing the correct environment `GOPATH`: +``` + mkdir -p projects/docker-machine/src/github.com/docker + export GOPATH="$PWD/projects/docker-machine" + cd projects/docker-machine/src/github.com/docker + git clone https://github.com/docker/machine + cd machine +``` -To build the docker-machine binary, simply run: +At this point, simply run: $ make build -From the Machine repository's root. You will now have a `bin/docker-machine`. +## Built binary + +After the build is complete a `bin/docker-machine` binary will be created. You may call: From 7fc4aedd1ccbdeb0f4496bd651f65c88ff6d8aaf Mon Sep 17 00:00:00 2001 From: gdm85 Date: Mon, 12 Oct 2015 20:12:34 +0200 Subject: [PATCH 2/2] Simplify fetch process by using go get Signed-off-by: Giuseppe Mazzotta --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 03b27064ce..30ac76be0f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,11 +34,11 @@ To build the `docker-machine` binary using containers, simply run: Make sure the source code directory is under a correct directory structure to use Go 1.5 vendoring; example of cloning and preparing the correct environment `GOPATH`: ``` - mkdir -p projects/docker-machine/src/github.com/docker - export GOPATH="$PWD/projects/docker-machine" - cd projects/docker-machine/src/github.com/docker - git clone https://github.com/docker/machine - cd machine + mkdir docker-machine + cd docker-machine + export GOPATH="$PWD" + go get github.com/docker/machine + cd docker-machine/src/github.com/docker/machine ``` At this point, simply run: