src, docker: Change pkg import path of DMA
[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 ENV DOCKER y
12 ENV repos_dir /root/go/src/github.com/opnfv
13
14 # get repo code and build
15 WORKDIR ${repos_dir}
16 RUN git clone https://gerrit.opnfv.org/gerrit/barometer
17 WORKDIR ${repos_dir}/barometer/src/dma
18 RUN go build ./cmd/server && \
19     go build ./cmd/threshold && \
20     go build ./cmd/infofetch
21
22 RUN cp server threshold infofetch /
23 WORKDIR /