blob: c99e9740180ec606e4b2528c2cb5877ec637a8ec [file] [log] [blame]
tiernoa8d63632018-05-10 13:12:32 +02001# This creates som/NBI docker from from last stable package
2
3FROM ubuntu:16.04
4
5# Set the working directory to /app
6WORKDIR /app/osm_nbi
7
8# avoid extra information from packages
9RUN echo 'path-exclude /usr/share/doc/*\n\
10path-include /usr/share/doc/*/copyright\n\
11path-exclude /usr/share/man/*\n\
12path-exclude /usr/share/groff/*\n\
13path-exclude /usr/share/info/*\n\
14path-exclude /usr/share/lintian/*\n\
15path-exclude /usr/share/linda/*\n'\
16> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
17 echo 'APT::Install-Recommends "false";\n\
18APT::AutoRemove::RecommendsImportant "false";\n\
19APT::AutoRemove::SuggestsImportant "false";\n'\
20> /etc/apt/apt.conf.d/99_norecommends
21
22
23RUN 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/*
28
29EXPOSE 9999
30
31LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
32 Description="This implements a north bound interface for OSM" \
33 Version="1.0" \
34 Author="Alfonso Tierno"
35
36# Used for local storage
37VOLUME /app/storage
38# Used for logs
39VOLUME /app/log
40
41# The following ENV can be added with "docker run -e xxx' to configure
42# server
43ENV OSMNBI_SOCKET_HOST 0.0.0.0
44ENV OSMNBI_SOCKET_PORT 9999
45# storage
46ENV OSMNBI_STORAGE_PATH /app/storage
47# database
48ENV OSMNBI_DATABASE_DRIVER mongo
49ENV OSMNBI_DATABASE_HOST mongo
50ENV OSMNBI_DATABASE_PORT 27017
51# web
52ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public
53# logs
54ENV OSMNBI_LOG_FILE /app/log
55ENV OSMNBI_LOG_LEVEL DEBUG
56# message
57ENV OSMNBI_MESSAGE_DRIVER kafka
58ENV OSMNBI_MESSAGE_HOST kafka
59ENV OSMNBI_MESSAGE_PORT 9092
60
61# Run app.py when the container launches
62CMD ["python3", "nbi.py"]
63