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