1 # This creates osm/NBI docker from local NBI source code
5 RUN apt-get update && apt-get -y install curl software-properties-common
7 ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
8 ARG RELEASE=ReleaseFOUR-daily
9 ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
10 ARG REPOSITORY=testing
12 RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
13 RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} NBI IM common" && apt update
15 RUN apt-get -y install python3-osm-nbi python3-osm-common python3-osm-im
17 # Set the working directory to /app
20 RUN apt-get update && apt-get install -y git python3 python3-jsonschema \
21 python3-pymongo python3-yaml python3-pip \
22 && pip3 install pip==9.0.3 \
23 && pip3 install aiokafka cherrypy pyangbind \
24 && mkdir -p /app/storage/kafka && mkdir -p /app/log
28 LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
29 Description="This implements a north bound interface for OSM" \
31 Author="Alfonso Tierno"
33 # Used for local storage
38 # The following ENV can be added with "docker run -e xxx' to configure
40 ENV OSMNBI_SOCKET_HOST 0.0.0.0
41 ENV OSMNBI_SOCKET_PORT 9999
43 ENV OSMNBI_STORAGE_PATH /app/storage
45 ENV OSMNBI_DATABASE_DRIVER mongo
46 ENV OSMNBI_DATABASE_HOST mongo
47 ENV OSMNBI_DATABASE_PORT 27017
49 ENV OSMNBI_STATIC_DIR /usr/lib/python3/dist-packages/osm_nbi/html_public
51 ENV OSMNBI_LOG_FILE /app/log
52 ENV OSMNBI_LOG_LEVEL DEBUG
54 ENV OSMNBI_MESSAGE_DRIVER kafka
55 ENV OSMNBI_MESSAGE_HOST kafka
56 ENV OSMNBI_MESSAGE_PORT 9092
58 ENV OSMNBI_LOG_FILE /app/log/nbi.log
59 ENV OSMNBI_LOG_LEVEL DEBUG
61 # Run app.py when the container launches
62 CMD ["python3", "/usr/lib/python3/dist-packages/osm_nbi/nbi.py"]