1 # This creates osm/NBI docker from local NBI source code
5 # Set the working directory to /app
8 # Copy the current directory contents into the container at /app
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 \
25 LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
26 Description="This implements a north bound interface for OSM" \
28 Author="Alfonso Tierno"
30 # Used for local storage
35 # The following ENV can be added with "docker run -e xxx' to configure
37 ENV OSMNBI_SOCKET_HOST 0.0.0.0
38 ENV OSMNBI_SOCKET_PORT 9999
40 ENV OSMNBI_STORAGE_PATH /app/storage
42 ENV OSMNBI_DATABASE_DRIVER mongo
43 ENV OSMNBI_DATABASE_HOST mongo
44 ENV OSMNBI_DATABASE_PORT 27017
46 ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public
48 ENV OSMNBI_LOG_FILE /app/log
49 ENV OSMNBI_LOG_LEVEL DEBUG
51 ENV OSMNBI_MESSAGE_DRIVER kafka
52 ENV OSMNBI_MESSAGE_HOST kafka
53 ENV OSMNBI_MESSAGE_PORT 9092
55 ENV OSMNBI_LOG_FILE /app/log/nbi.log
56 ENV OSMNBI_LOG_LEVEL DEBUG
58 # Run app.py when the container launches
59 CMD ["python3", "nbi.py"]