Removed common files and use osm/common package
[osm/NBI.git] / Dockerfile.local
1 # This creates osm/NBI docker from local NBI source code
2
3 FROM ubuntu:16.04
4
5 # Set the working directory to /app
6 WORKDIR /app/osm_nbi
7
8 # Copy the current directory contents into the container at /app
9 ADD . /app
10
11 RUN apt-get update && apt-get install -y git python3 python3-jsonschema \
12     python3-cherrypy3 python3-pymongo python3-yaml python3-pip \
13     && pip3 install pip==9.0.3 \
14     && pip3 install aiokafka \
15     && mkdir -p /app/storage/kafka && mkdir -p /app/log 
16 RUN git clone https://osm.etsi.org/gerrit/osm/common.git \
17     && cd common  && python3 setup.py develop && cd ..
18 #    && pip3 install -U -r requirements.txt \
19 #    && cd ..
20
21
22
23 EXPOSE 9999
24
25 LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
26       Description="This implements a north bound interface for OSM" \
27       Version="1.0" \
28       Author="Alfonso Tierno"
29
30 # Used for local storage
31 VOLUME /app/storage
32 # Used for logs
33 VOLUME /app/log
34
35 # The following ENV can be added with "docker run -e xxx' to configure
36 # server
37 ENV OSMNBI_SOCKET_HOST     0.0.0.0
38 ENV OSMNBI_SOCKET_PORT     9999
39 # storage
40 ENV OSMNBI_STORAGE_PATH    /app/storage
41 # database
42 ENV OSMNBI_DATABASE_DRIVER mongo
43 ENV OSMNBI_DATABASE_HOST   mongo
44 ENV OSMNBI_DATABASE_PORT   27017
45 # web
46 ENV OSMNBI_STATIC_DIR      /app/osm_nbi/html_public
47 # logs
48 ENV OSMNBI_LOG_FILE        /app/log
49 ENV OSMNBI_LOG_LEVEL       DEBUG
50 # message
51 ENV OSMNBI_MESSAGE_DRIVER  kafka
52 ENV OSMNBI_MESSAGE_HOST    kafka
53 ENV OSMNBI_MESSAGE_PORT    9092
54
55 # Run app.py when the container launches
56 CMD ["python3", "nbi.py"]
57