diff --git a/README.md b/README.md index 2742b71..43dc7d3 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ dockerfiles - [x] aria2 :+1: - [x] audiowaveform - [x] bro +- [x] cadvisor - [x] casperjs :+1: - [x] chinadns - [x] collectd diff --git a/cadvisor/Dockerfile b/cadvisor/Dockerfile new file mode 100644 index 0000000..ff84698 --- /dev/null +++ b/cadvisor/Dockerfile @@ -0,0 +1,24 @@ +# +# Dockerfile for cadvisor +# + +FROM alpine +MAINTAINER kev + +RUN set -xe \ + && apk add --update ca-certificates device-mapper \ + && wget https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/8/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk \ + && wget https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/8/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-bin-2.21-r2.apk \ + && apk add --allow-untrusted glibc-2.21-r2.apk glibc-bin-2.21-r2.apk \ + && apk add zfs-utils --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted \ + && /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib \ + && echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf \ + && rm -rf /var/cache/apk/* + +RUN set -xe \ + && wget https://github.com/google/cadvisor/releases/download/v0.20.5/cadvisor -O /usr/bin/cadvisor \ + && chmod +x /usr/bin/cadvisor + +EXPOSE 8080 + +ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"] diff --git a/cadvisor/README.md b/cadvisor/README.md new file mode 100644 index 0000000..5b9344c --- /dev/null +++ b/cadvisor/README.md @@ -0,0 +1,24 @@ +cadvisor +======== + +![](https://badge.imagelayers.io/vimagick/cadvisor:latest.svg) + +[cAdvisor][1] (Container Advisor) provides container users an understanding of +the resource usage and performance characteristics of their running containers. + +## docker-compose.yml + +```yaml +cadvisor: + image: vimagick/cadvisor + ports: + - "8080:8080" + volumes: + - /:/rootfs:ro + - /var/run:/var/run:rw + - /sys:/sys:ro + - /var/lib/docker/:/var/lib/docker:ro + restart: always +``` + +[1]: https://github.com/google/cadvisor diff --git a/cadvisor/docker-compose.yml b/cadvisor/docker-compose.yml new file mode 100644 index 0000000..490e2f5 --- /dev/null +++ b/cadvisor/docker-compose.yml @@ -0,0 +1,10 @@ +cadvisor: + image: vimagick/cadvisor + ports: + - "8080:8080" + volumes: + - /:/rootfs:ro + - /var/run:/var/run:rw + - /sys:/sys:ro + - /var/lib/docker/:/var/lib/docker:ro + restart: always