Add docker integration for ceph exporter
This commit is contained in:
parent
3d4e949f49
commit
c5bec3962d
16
Dockerfile
16
Dockerfile
|
@ -1,16 +1,24 @@
|
|||
FROM ubuntu:14.04
|
||||
MAINTAINER Vaibhav Bhembre <vaibhav@digitalocean.com>
|
||||
|
||||
ENV GOROOT /goroot
|
||||
ENV GOPATH /go
|
||||
ENV PATH $GOROOT/bin:$PATH
|
||||
ENV APPLOC $GOPATH/src/github.com/digitalocean/ceph_exporter
|
||||
|
||||
ADD . $APPLOC
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install build-essential
|
||||
apt-get install -y build-essential git curl && \
|
||||
apt-get install -y librados-dev librbd-dev
|
||||
|
||||
RUN \
|
||||
mkdir -p /goroot && \
|
||||
curl https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
|
||||
|
||||
WORKDIR $APPLOC
|
||||
RUN go get -d && \
|
||||
go build -o /bin/ceph_exporter && \
|
||||
rm -rf $GOPATH
|
||||
go build -o /bin/ceph_exporter
|
||||
|
||||
ENTRYPOINT ["/bin/ceph_exporter"
|
||||
EXPOSE 9190
|
||||
CMD ["/bin/ceph_exporter"]
|
||||
|
|
Loading…
Reference in New Issue