2f2f57e5a192e1ace8268575bf533a7301e0f17b
[barometer.git] / docker / barometer-collectd / Dockerfile
1 FROM centos:7
2 RUN yum update -y && \
3         yum install -y which sudo git && \
4         yum clean all && \
5         git config --global http.sslVerify false
6
7 ENV DOCKER y
8 ENV WITH_DPDK y
9 ENV COLLECTD_FLAVOR stable
10 ENV repos_dir /src
11 ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
12
13 WORKDIR ${repos_dir}
14 RUN git clone https://gerrit.opnfv.org/gerrit/barometer
15 WORKDIR ${repos_dir}/barometer/systems
16 RUN sh ./build_base_machine.sh && \
17         useradd -ms /bin/bash collectd_exec && \
18         echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
19
20 WORKDIR ${openstack_plugins}
21 RUN make && \
22         pip install --upgrade pip && \
23         pip install -r ${openstack_plugins}/collectd-openstack-plugins/requirements.txt
24
25 COPY run_collectd.sh /run_collectd.sh
26 RUN chmod +x /run_collectd.sh
27
28 ENTRYPOINT ["/run_collectd.sh"]