Renaming prometheus plugin to volume-count

This commit is contained in:
Paul Bellamy
2016-10-05 11:44:34 +01:00
parent 7234659338
commit 3670fe99b9
8 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
# Start from weaveworks/scope, so that we have a docker client built in.
FROM python:2
MAINTAINER Weaveworks Inc <help@weave.works>
LABEL works.weave.role=system
RUN pip install docker-py
# Add our plugin
ADD ./volume-count.py /usr/bin/volume-count.py
ENTRYPOINT ["/usr/bin/volume-count.py"]

View File

@@ -0,0 +1,20 @@
.PHONY: run clean
SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
EXE=volume-count.py
IMAGE=weavescope-volume-count-plugin
UPTODATE=.$(EXE).uptodate
run: $(UPTODATE)
$(SUDO) docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/scope/plugins:/var/run/scope/plugins \
--name $(IMAGE) $(IMAGE)
$(UPTODATE): $(EXE) Dockerfile
$(SUDO) docker build -t $(IMAGE) .
touch $@
clean:
- rm -rf $(UPTODATE)
- $(SUDO) docker rmi $(IMAGE)