Merge pull request #15 from gdevillele/pr-faster-build

improve speed of "go build" as well as "docker build"
This commit is contained in:
Gaetan 2017-04-28 13:08:39 -07:00 committed by GitHub
commit 639764c00d
4 changed files with 6 additions and 4 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.git
build

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
.DS_Store .DS_Store
/build build

View File

@ -6,7 +6,7 @@
# build the CLI # build the CLI
build: clean build: clean
@go build -o ./build/docker ./cmd/docker @go build -o ./build/docker github.com/docker/cli/cmd/docker
# remove build artifacts # remove build artifacts
clean: clean:
@ -21,4 +21,4 @@ test:
cross: clean cross: clean
@gox -output build/docker-{{.OS}}-{{.Arch}} \ @gox -output build/docker-{{.OS}}-{{.Arch}} \
-osarch="linux/arm linux/amd64 darwin/amd64 windows/amd64" \ -osarch="linux/arm linux/amd64 darwin/amd64 windows/amd64" \
./cmd/docker github.com/docker/cli/cmd/docker

View File

@ -10,7 +10,7 @@ DEV_DOCKER_IMAGE_NAME = docker_cli_dev
# build docker image (dockerfiles/Dockerfile.build) # build docker image (dockerfiles/Dockerfile.build)
build_docker_image: build_docker_image:
@docker build -t $(DEV_DOCKER_IMAGE_NAME) -f ./dockerfiles/Dockerfile.build . > /dev/null @docker build -q -t $(DEV_DOCKER_IMAGE_NAME) -f ./dockerfiles/Dockerfile.build .
# build executable using a container # build executable using a container
build: build_docker_image build: build_docker_image