Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1091 from sambooo/hotfix/implicit-sudo
Browse files Browse the repository at this point in the history
Infer 'sudo docker' from the exit code of `docker info`
  • Loading branch information
squaremo authored May 21, 2018
2 parents f9de55b + 03e821a commit e126f36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT: all
.PHONY: all release-bins clean realclean test integration-test

DOCKER?=docker
SUDO := $(shell docker info > /dev/null 2> /dev/null || echo "sudo")
TEST_FLAGS?=

include docker/kubectl.version
Expand Down Expand Up @@ -42,7 +42,7 @@ test:
build/.%.done: docker/Dockerfile.%
mkdir -p ./build/docker/$*
cp $^ ./build/docker/$*/
${DOCKER} build -t quay.io/weaveworks/$* -t quay.io/weaveworks/$*:$(IMAGE_TAG) \
$(SUDO) docker build -t quay.io/weaveworks/$* -t quay.io/weaveworks/$*:$(IMAGE_TAG) \
--build-arg VCS_REF="$(VCS_REF)" \
--build-arg BUILD_DATE="$(BUILD_DATE)" \
-f build/docker/$*/Dockerfile.$* ./build/docker/$*
Expand Down

0 comments on commit e126f36

Please sign in to comment.