2016-01-06 19:07:02 +00:00
|
|
|
FROM ubuntu:14.04
|
|
|
|
MAINTAINER Vaibhav Bhembre <vaibhav@digitalocean.com>
|
|
|
|
|
2016-01-06 22:20:47 +00:00
|
|
|
ENV GOROOT /goroot
|
2016-01-06 19:07:02 +00:00
|
|
|
ENV GOPATH /go
|
2016-01-06 22:20:47 +00:00
|
|
|
ENV PATH $GOROOT/bin:$PATH
|
2016-01-06 19:07:02 +00:00
|
|
|
ENV APPLOC $GOPATH/src/github.com/digitalocean/ceph_exporter
|
|
|
|
|
2016-01-06 22:20:47 +00:00
|
|
|
ADD . $APPLOC
|
|
|
|
|
2016-01-06 19:07:02 +00:00
|
|
|
RUN apt-get update && \
|
2016-01-06 22:20:47 +00:00
|
|
|
apt-get install -y build-essential git curl && \
|
2016-01-06 19:07:02 +00:00
|
|
|
apt-get install -y librados-dev librbd-dev
|
|
|
|
|
2016-01-06 22:20:47 +00:00
|
|
|
RUN \
|
|
|
|
mkdir -p /goroot && \
|
|
|
|
curl https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
|
|
|
|
|
2016-01-06 19:07:02 +00:00
|
|
|
WORKDIR $APPLOC
|
|
|
|
RUN go get -d && \
|
2016-01-06 22:20:47 +00:00
|
|
|
go build -o /bin/ceph_exporter
|
2016-01-06 19:07:02 +00:00
|
|
|
|
2016-01-06 22:20:47 +00:00
|
|
|
EXPOSE 9190
|
|
|
|
CMD ["/bin/ceph_exporter"]
|