From 87449dbaa18410677f541a50e96120e98c002a66 Mon Sep 17 00:00:00 2001 From: Gaetan de Villele Date: Thu, 27 Apr 2017 14:55:05 -0700 Subject: [PATCH] make go build and docker build operations faster Signed-off-by: Gaetan de Villele --- .dockerignore | 2 ++ .gitignore | 2 +- Makefile | 4 ++-- docker.Makefile | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..b0e1ba591b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +build \ No newline at end of file diff --git a/.gitignore b/.gitignore index 68fc691841..30944692f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .DS_Store -/build +build diff --git a/Makefile b/Makefile index d8a54239b6..b18dbf5f49 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docker.Makefile b/docker.Makefile index 66b48c4036..6690d88efa 100644 --- a/docker.Makefile +++ b/docker.Makefile @@ -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