mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-16 03:49:52 +00:00
Renaming prometheus plugin to volume-count
This commit is contained in:
10
examples/plugins/volume-count/Dockerfile
Normal file
10
examples/plugins/volume-count/Dockerfile
Normal 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"]
|
||||
20
examples/plugins/volume-count/Makefile
Normal file
20
examples/plugins/volume-count/Makefile
Normal 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)
|
||||
Reference in New Issue
Block a user