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