blob: 7f1a02b40467c0c9d62bf40555cacb77591a3bd9 [file] [log] [blame]
tiernoa8d63632018-05-10 13:12:32 +02001# This creates osm/NBI docker from local NBI source code
2
Mike Marchettic678d042018-04-18 13:51:27 -04003FROM ubuntu:16.04
4
5# Set the working directory to /app
6WORKDIR /app/osm_nbi
7
8# Copy the current directory contents into the container at /app
9ADD . /app
10
tiernoa8d63632018-05-10 13:12:32 +020011RUN apt-get update && apt-get install -y git python3 python3-jsonschema \
Mike Marchettic678d042018-04-18 13:51:27 -040012 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
tiernoa8d63632018-05-10 13:12:32 +020016RUN 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
Mike Marchettic678d042018-04-18 13:51:27 -040021
22
23EXPOSE 9999
24
25LABEL 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
31VOLUME /app/storage
32# Used for logs
33VOLUME /app/log
34
35# The following ENV can be added with "docker run -e xxx' to configure
36# server
37ENV OSMNBI_SOCKET_HOST 0.0.0.0
38ENV OSMNBI_SOCKET_PORT 9999
39# storage
40ENV OSMNBI_STORAGE_PATH /app/storage
41# database
42ENV OSMNBI_DATABASE_DRIVER mongo
43ENV OSMNBI_DATABASE_HOST mongo
44ENV OSMNBI_DATABASE_PORT 27017
45# web
46ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public
47# logs
48ENV OSMNBI_LOG_FILE /app/log
49ENV OSMNBI_LOG_LEVEL DEBUG
50# message
51ENV OSMNBI_MESSAGE_DRIVER kafka
52ENV OSMNBI_MESSAGE_HOST kafka
53ENV OSMNBI_MESSAGE_PORT 9092
54
55# Run app.py when the container launches
56CMD ["python3", "nbi.py"]
57