docker: move addition of repo towards the end to preserve the untouched cache

This commit is contained in:
Vaibhav Bhembre 2016-05-17 21:04:32 -04:00
parent 37afdac4d0
commit b645c26acd
2 changed files with 3 additions and 4 deletions

View File

@ -6,8 +6,6 @@ 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 -y build-essential git curl && \
apt-get install -y librados-dev librbd-dev
@ -16,6 +14,7 @@ RUN \
mkdir -p /goroot && \
curl https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
ADD . $APPLOC
WORKDIR $APPLOC
RUN go get -d && \
go build -o /bin/ceph_exporter

View File

@ -31,8 +31,8 @@ var (
recoveryIORateRegex = regexp.MustCompile(`(\d+) (\w{2})/s`)
recoveryIOKeysRegex = regexp.MustCompile(`(\d+) keys/s`)
recoveryIOObjectsRegex = regexp.MustCompile(`(\d+) objects/s`)
clientIOReadRegex = regexp.MustCompile(`(\d+) (\w[bB])/s rd`)
clientIOWriteRegex = regexp.MustCompile(`(\d+) (\w[bB])/s wr`)
clientIOReadRegex = regexp.MustCompile(`(\d+) ([kKmMgG][bB])/s rd`)
clientIOWriteRegex = regexp.MustCompile(`(\d+) ([kKmMgG][bB])/s wr`)
clientIOReadOpsRegex = regexp.MustCompile(`(\d+) op/s rd`)
clientIOWriteOpsRegex = regexp.MustCompile(`(\d+) op/s wr`)