X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docker%2Fbarometer-collectd%2FDockerfile;h=8de66c69bca59c143e68dc9a9eb0089b12e842ac;hb=4abee7e46d1602f796f8aebed0a51da9476d0832;hp=585e5d05f4dc44f6ae4b2c81b92554cbe414fe52;hpb=adff3b393f0e345c4611b836cc7c11f968498d76;p=barometer.git diff --git a/docker/barometer-collectd/Dockerfile b/docker/barometer-collectd/Dockerfile index 585e5d05..8de66c69 100644 --- a/docker/barometer-collectd/Dockerfile +++ b/docker/barometer-collectd/Dockerfile @@ -1,24 +1,43 @@ +# Copyright 2017-2019 Intel Corporation and OPNFV. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + FROM centos:7 -RUN yum update -y -RUN yum install -y which sudo -RUN yum install -y git +RUN yum update -y && \ + yum install -y which sudo git && \ + yum clean all && \ + git config --global http.sslVerify false + ENV DOCKER y +ENV WITH_DPDK y +ENV COLLECTD_FLAVOR stable ENV repos_dir /src ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins -RUN git config --global http.sslVerify false WORKDIR ${repos_dir} RUN git clone https://gerrit.opnfv.org/gerrit/barometer WORKDIR ${repos_dir}/barometer/systems -RUN sh ./build_base_machine.sh - -RUN useradd -ms /bin/bash collectd_exec -RUN echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +RUN sh ./build_base_machine.sh && \ + useradd -ms /bin/bash collectd_exec && \ + echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers WORKDIR ${openstack_plugins} -RUN make -RUN pip install --upgrade pip -RUN pip install -r ${openstack_plugins}/collectd-openstack-plugins/requirements.txt +RUN make && \ + pip install --upgrade pip && \ + pip install -r ${openstack_plugins}/collectd-openstack-plugins/requirements.txt COPY run_collectd.sh /run_collectd.sh RUN chmod +x /run_collectd.sh + +ENTRYPOINT ["/run_collectd.sh"]