Commit 0e75f74c authored by Sam Broughton's avatar Sam Broughton
Browse files

Don't call `sudo docker` when building on macOS

parent f0f3314f
......@@ -3,6 +3,7 @@
VERSION=$(shell git symbolic-ref --short HEAD)-$(shell git rev-parse --short HEAD)
SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
all: image
......@@ -22,13 +23,13 @@ cmd/kured/kured: cmd/kured/*.go
build/.image.done: cmd/kured/Dockerfile cmd/kured/kured
mkdir -p build
cp $^ build
sudo -E docker build -t$(DH_ORG)/kured:$(VERSION) -f build/Dockerfile ./build
$(SUDO) docker build -t$(DH_ORG)/kured:$(VERSION) -f build/Dockerfile ./build
touch $@
image: build/.image.done
publish-image: image
sudo -E docker push$(DH_ORG)/kured:$(VERSION)
$(SUDO) docker push$(DH_ORG)/kured:$(VERSION)
minikube-publish: image
sudo -E docker save$(DH_ORG)/kured:$(VERSION) | (eval $$(minikube docker-env) && docker load)
$(SUDO) docker save$(DH_ORG)/kured:$(VERSION) | (eval $$(minikube docker-env) && docker load)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment