afe7c3f36e6c898eb260bab16d6dd2a2c1b3e17d
[barometer.git] / docker / barometer-dma / Dockerfile
1 FROM centos:7
2
3 # install prerequisites
4 RUN yum update -y &&\
5     yum install -y which sudo git libvirt-devel && \
6     rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && \
7     curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo && \
8     yum install -y golang
9
10 # set environment variables
11 # need to change when we move to barometer
12 ENV DOCKER y
13 ENV repos_dir /root/go/src/github.com/distributed-monitoring/agent
14
15 # copy repo code and 
16 # COPY . ${repos_dir}
17 WORKDIR ${repos_dir}
18 RUN git clone https://gerrit.opnfv.org/gerrit/barometer && \
19     mv barometer/src/dma/* ./
20 RUN go build ./cmd/server && \
21     go build ./cmd/threshold && \
22     go build ./cmd/infofetch
23
24 RUN cp server threshold infofetch /
25 WORKDIR /