make go build and docker build operations faster

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
This commit is contained in:
Gaetan de Villele 2017-04-27 14:55:05 -07:00
parent e8d0ecdf7e
commit 87449dbaa1
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
/build
build

View File

@ -6,7 +6,7 @@
# build the CLI
build: clean
@go build -o ./build/docker ./cmd/docker
@go build -o ./build/docker github.com/docker/cli/cmd/docker
# remove build artifacts
clean:
@ -16,4 +16,4 @@ clean:
cross: clean
@gox -output build/docker-{{.OS}}-{{.Arch}} \
-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:
@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: build_docker_image