X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=Dockerfile.fromdeb;fp=Dockerfile.fromdeb;h=c99e9740180ec606e4b2528c2cb5877ec637a8ec;hb=a8d63635eecb1c8debab5f674931a453ea39e78d;hp=0000000000000000000000000000000000000000;hpb=0ffaa99c277d76ca49fdbe4d4b6b9df4d7484857;p=osm%2FNBI.git diff --git a/Dockerfile.fromdeb b/Dockerfile.fromdeb new file mode 100644 index 0000000..c99e974 --- /dev/null +++ b/Dockerfile.fromdeb @@ -0,0 +1,63 @@ +# This creates som/NBI docker from from last stable package + +FROM ubuntu:16.04 + +# Set the working directory to /app +WORKDIR /app/osm_nbi + +# avoid extra information from packages +RUN echo 'path-exclude /usr/share/doc/*\n\ +path-include /usr/share/doc/*/copyright\n\ +path-exclude /usr/share/man/*\n\ +path-exclude /usr/share/groff/*\n\ +path-exclude /usr/share/info/*\n\ +path-exclude /usr/share/lintian/*\n\ +path-exclude /usr/share/linda/*\n'\ +> /etc/dpkg/dpkg.cfg.d/01_nodoc && \ + echo 'APT::Install-Recommends "false";\n\ +APT::AutoRemove::RecommendsImportant "false";\n\ +APT::AutoRemove::SuggestsImportant "false";\n'\ +> /etc/apt/apt.conf.d/99_norecommends + + +RUN apt-get update && apt-get install -y curl software-properties-common \ + && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR testing common NBI" \ + && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \ + && apt-get update && apt-get install -y python3-osm-nbi python3-osm-common \ + && rm -rf /var/lib/apt/lists/* + +EXPOSE 9999 + +LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \ + Description="This implements a north bound interface for OSM" \ + Version="1.0" \ + Author="Alfonso Tierno" + +# Used for local storage +VOLUME /app/storage +# Used for logs +VOLUME /app/log + +# The following ENV can be added with "docker run -e xxx' to configure +# server +ENV OSMNBI_SOCKET_HOST 0.0.0.0 +ENV OSMNBI_SOCKET_PORT 9999 +# storage +ENV OSMNBI_STORAGE_PATH /app/storage +# database +ENV OSMNBI_DATABASE_DRIVER mongo +ENV OSMNBI_DATABASE_HOST mongo +ENV OSMNBI_DATABASE_PORT 27017 +# web +ENV OSMNBI_STATIC_DIR /app/osm_nbi/html_public +# logs +ENV OSMNBI_LOG_FILE /app/log +ENV OSMNBI_LOG_LEVEL DEBUG +# message +ENV OSMNBI_MESSAGE_DRIVER kafka +ENV OSMNBI_MESSAGE_HOST kafka +ENV OSMNBI_MESSAGE_PORT 9092 + +# Run app.py when the container launches +CMD ["python3", "nbi.py"] +