blob: 68c78503e6384f9a275e9e781a198f04a3674d4e [file] [log] [blame]
tiernoc94c3df2018-02-09 15:38:54 +01001FROM 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
tierno0f98af52018-03-19 10:28:22 +01009RUN apt-get update && apt-get -y install git python3 python3-jsonschema \
tiernoc94c3df2018-02-09 15:38:54 +010010 python3-cherrypy3 python3-pymongo python3-yaml python3-pip \
11 && pip3 install aiokafka \
12 && mkdir -p /app/storage/kafka && mkdir -p /app/log
13
14
15EXPOSE 9999
16
17LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
18 Description="This implements a north bound interface for OSM" \
19 Version="1.0" \
20 Author="Alfonso Tierno"
21
22# Used for local storage
23VOLUME /app/storage
24# Used for logs
25VOLUME /app/log
26
27# The following ENV can be added with "docker run -e xxx' to configure
28# server
29ENV OSMNBI_SOCKET_HOST 0.0.0.0
30ENV OSMNBI_SOCKET_PORT 9999
31# storage
32ENV OSMNBI_STORAGE_PATH /app/storage
33# database
34ENV OSMNBI_DATABASE_DRIVER mongo
35ENV OSMNBI_DATABASE_HOST mongo
36ENV OSMNBI_DATABASE_PORT 27017
37# web
38ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public
39# logs
40ENV OSMNBI_LOG_FILE /app/log
41ENV OSMNBI_LOG_LEVEL DEBUG
42# message
43ENV OSMNBI_MESSAGE_DRIVER kafka
44ENV OSMNBI_MESSAGE_HOST kafka
45ENV OSMNBI_MESSAGE_PORT 9092
46
47# Run app.py when the container launches
48CMD ["python3", "nbi.py"]
49