bug fix: installation of node, bower and grunt for reporting docker
[releng.git] / utils / test / reporting / docker / Dockerfile
1 ########################################
2 #   Docker container for OPNFV-REPORTING
3 ########################################
4 # Purpose: run opnfv-reporting to provide consistent Testing reporting
5 #
6 # Maintained by Morgan Richomme
7 # Build:
8 #    $ docker build -t opnfv/testreporting:tag .
9 ##
10 # All rights reserved. This program and the accompanying materials
11 # are made available under the terms of the Apache License, Version 2.0
12 # which accompanies this distribution, and is available at
13 # http://www.apache.org/licenses/LICENSE-2.0
14 #
15
16 FROM nginx:stable
17
18 MAINTAINER Morgan Richomme <morgan.richomme@orange.com>
19 LABEL version="1.0" description="OPNFV Test Reporting Docker container"
20
21 ARG BRANCH=master
22
23 ENV HOME /home/opnfv
24 ENV working_dir ${HOME}/releng/utils/test/reporting
25 ENV CONFIG_REPORTING_YAML ${working_dir}/reporting.yaml
26
27 WORKDIR ${HOME}
28 # Packaged dependencies
29 RUN apt-get update && apt-get install -y \
30 build-essential \
31 ssh \
32 curl \
33 gnupg \
34 python-pip \
35 python-dev \
36 python-setuptools \
37 git-core \
38 supervisor \
39 --no-install-recommends
40
41 RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
42
43 RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng /home/opnfv/releng
44 RUN pip install -r ${working_dir}/requirements.txt
45
46 RUN sh -c 'curl -sL https://deb.nodesource.com/setup_8.x | bash -' \
47     && apt-get install -y nodejs \
48     && npm install -g bower \
49     && npm install -g grunt \
50     && npm install -g grunt-cli
51
52 WORKDIR ${working_dir}
53 RUN python setup.py install
54 RUN docker/reporting.sh
55 RUN docker/web_server.sh
56
57 expose 8000
58
59 CMD ["/usr/bin/supervisord"]