| tierno | a8d6363 | 2018-05-10 13:12:32 +0200 | [diff] [blame] | 1 | # This creates som/NBI docker from from last stable package |
| 2 | |
| 3 | FROM ubuntu:16.04 |
| 4 | |
| 5 | # Set the working directory to /app |
| 6 | WORKDIR /app/osm_nbi |
| 7 | |
| 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 |
| 21 | |
| 22 | |
| 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/* |
| 28 | |
| 29 | EXPOSE 9999 |
| 30 | |
| 31 | LABEL 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 |
| 37 | VOLUME /app/storage |
| 38 | # Used for logs |
| 39 | VOLUME /app/log |
| 40 | |
| 41 | # The following ENV can be added with "docker run -e xxx' to configure |
| 42 | # server |
| 43 | ENV OSMNBI_SOCKET_HOST 0.0.0.0 |
| 44 | ENV OSMNBI_SOCKET_PORT 9999 |
| 45 | # storage |
| 46 | ENV OSMNBI_STORAGE_PATH /app/storage |
| 47 | # database |
| 48 | ENV OSMNBI_DATABASE_DRIVER mongo |
| 49 | ENV OSMNBI_DATABASE_HOST mongo |
| 50 | ENV OSMNBI_DATABASE_PORT 27017 |
| 51 | # web |
| 52 | ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public |
| 53 | # logs |
| 54 | ENV OSMNBI_LOG_FILE /app/log |
| 55 | ENV OSMNBI_LOG_LEVEL DEBUG |
| 56 | # message |
| 57 | ENV OSMNBI_MESSAGE_DRIVER kafka |
| 58 | ENV OSMNBI_MESSAGE_HOST kafka |
| 59 | ENV OSMNBI_MESSAGE_PORT 9092 |
| 60 | |
| 61 | # Run app.py when the container launches |
| 62 | CMD ["python3", "nbi.py"] |
| 63 | |