diff --git a/.gitignore b/.gitignore index de8d9416..12babf36 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ prog/weavewait/weavewait prog/weavewait/weavewait_noop prog/weavewait/weavewait_nomcast prog/weaveutil/weaveutil +prog/plugin/Dockerfile prog/plugin/plugin testing/cover/cover testing/runner/runner diff --git a/Makefile b/Makefile index 69e0dc59..0faadac9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PUBLISH=publish_weave publish_weaveexec publish_plugin .DEFAULT: all -.PHONY: all exes testrunner update tests lint publish $(PUBLISH) clean clean-bin prerequisites build run-smoketests +.PHONY: all exes testrunner update tests lint publish $(PUBLISH) clean clean-bin prerequisites build run-smoketests prog/plugin/Dockerfile # If you can use docker without being root, you can do "make SUDO=" SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E") @@ -144,6 +144,9 @@ $(WEAVEEXEC_UPTODATE): prog/weaveexec/Dockerfile prog/weaveexec/symlink $(DOCKER $(SUDO) DOCKER_HOST=$(DOCKER_HOST) docker build -t $(WEAVEEXEC_IMAGE) prog/weaveexec touch $@ +prog/plugin/Dockerfile: prog/plugin/Dockerfile.template + sed -e "s/DOCKERHUB_USER/$(DOCKERHUB_USER)/" $^ > $@ + $(PLUGIN_UPTODATE): prog/plugin/Dockerfile $(PLUGIN_EXE) $(WEAVEEXEC_UPTODATE) $(SUDO) docker build -t $(PLUGIN_IMAGE) prog/plugin touch $@ diff --git a/prog/plugin/Dockerfile b/prog/plugin/Dockerfile.template similarity index 66% rename from prog/plugin/Dockerfile rename to prog/plugin/Dockerfile.template index 946f0b28..6ed48f5c 100644 --- a/prog/plugin/Dockerfile +++ b/prog/plugin/Dockerfile.template @@ -1,3 +1,3 @@ -FROM weaveworks/weaveexec +FROM DOCKERHUB_USER/weaveexec ADD ./plugin /home/weave/ ENTRYPOINT ["/home/weave/plugin"]