dockerize testAPI
[releng.git] / utils / test / result_collection_api / docker / Dockerfile
1 #######################################################
2 #   Docker container for OPNFV-TESTAPI
3 #######################################################
4 # Purpose: run opnfv-testapi for gathering test results
5 #
6 # Maintained by SerenaFeng
7 # Build:
8 #    $ docker build -t opnfv/testapi:tag .
9 #
10 # Execution:
11 #    $ docker run -dti -p 8000:8000 \
12 #      -e "swagger_url=http://10.63.243.17:8000" \
13 #      -e "mongodb_url=mongodb://10.63.243.17:27017/" \
14 #      -e "api_port=8000"
15 #      opnfv/testapi:tag
16 #
17 # NOTE: providing swagger_url, api_port, mongodb_url is optional.
18 #       If not provided, it will use the default one
19 #       configured in config.ini
20 #
21 # All rights reserved. This program and the accompanying materials
22 # are made available under the terms of the Apache License, Version 2.0
23 # which accompanies this distribution, and is available at
24 # http://www.apache.org/licenses/LICENSE-2.0
25 #
26
27 FROM ubuntu:14.04
28 MAINTAINER SerenaFeng <feng.xiaowei@zte.com.cn>
29 LABEL version="v1" description="OPNFV TestAPI Docker container"
30
31 ENV HOME /home
32
33 # Packaged dependencies
34 RUN apt-get update && apt-get install -y \
35 curl \
36 git \
37 gcc \
38 wget \
39 python-dev \
40 python-pip \
41 crudini \
42 --no-install-recommends
43
44 RUN pip install --upgrade pip
45
46 RUN git config --global http.sslVerify false
47 RUN git clone https://gerrit.opnfv.org/gerrit/releng /home/releng
48
49 WORKDIR /home/releng/utils/test/result_collection_api/
50 RUN pip install -r requirements.txt
51 RUN python setup.py install
52 CMD ["bash", "docker/start-server.sh"]