1 # This creates som/NBI docker from from last stable package
5 # Set the working directory to /app
8 # avoid extra information from packages
9 RUN echo 'path-exclude /usr/share/doc/*\n\
10 path-include /usr/share/doc/*/copyright\n\
11 path-exclude /usr/share/man/*\n\
12 path-exclude /usr/share/groff/*\n\
13 path-exclude /usr/share/info/*\n\
14 path-exclude /usr/share/lintian/*\n\
15 path-exclude /usr/share/linda/*\n'\
16 > /etc/dpkg/dpkg.cfg.d/01_nodoc && \
17 echo 'APT::Install-Recommends "false";\n\
18 APT::AutoRemove::RecommendsImportant "false";\n\
19 APT::AutoRemove::SuggestsImportant "false";\n'\
20 > /etc/apt/apt.conf.d/99_norecommends
23 RUN apt-get update && apt-get install -y curl software-properties-common \
24 && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR testing common NBI" \
25 && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \
26 && apt-get update && apt-get install -y python3-osm-nbi python3-osm-common \
27 && rm -rf /var/lib/apt/lists/*
31 LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
32 Description="This implements a north bound interface for OSM" \
34 Author="Alfonso Tierno"
36 # Used for local storage
41 # The following ENV can be added with "docker run -e xxx' to configure
43 ENV OSMNBI_SOCKET_HOST 0.0.0.0
44 ENV OSMNBI_SOCKET_PORT 9999
46 ENV OSMNBI_STORAGE_PATH /app/storage
48 ENV OSMNBI_DATABASE_DRIVER mongo
49 ENV OSMNBI_DATABASE_HOST mongo
50 ENV OSMNBI_DATABASE_PORT 27017
52 ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public
54 ENV OSMNBI_LOG_FILE /app/log
55 ENV OSMNBI_LOG_LEVEL DEBUG
57 ENV OSMNBI_MESSAGE_DRIVER kafka
58 ENV OSMNBI_MESSAGE_HOST kafka
59 ENV OSMNBI_MESSAGE_PORT 9092
61 # Run app.py when the container launches
62 CMD ["python3", "nbi.py"]