blob: 7d37b7982f99f03d46b53b86ee84f6def6b17ae6 [file] [log] [blame]
Mike Marchetti182bd732018-09-05 09:52:42 -04001# Copyright 2018 Whitestack, LLC
2# *************************************************************
3
4# This file is part of OSM Monitoring module
5# All Rights Reserved to Whitestack, LLC
6
7# Licensed under the Apache License, Version 2.0 (the "License"); you may
8# not use this file except in compliance with the License. You may obtain
9# a copy of the License at
10
11# http://www.apache.org/licenses/LICENSE-2.0
12
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16# License for the specific language governing permissions and limitations
17# under the License.
18
19# For those usages not covered by the Apache License, Version 2.0 please
20# contact: bdiaz@whitestack.com or glavado@whitestack.com
21##
22
23FROM ubuntu:16.04
24
25LABEL authors="Guillermo Calvino"
26
27RUN apt-get update && apt-get -y install curl software-properties-common
28
Mike Marchetti13d76c82018-09-19 15:00:36 -040029RUN apt-get --yes update \
30 && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
tierno6bc45fb2018-10-16 09:41:23 +020031 && apt-get --yes install python3-pymongo && pip3 install pip==9.0.3
Mike Marchetti13d76c82018-09-19 15:00:36 -040032
Mike Marchetti182bd732018-09-05 09:52:42 -040033ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
34ARG RELEASE=ReleaseFOUR-daily
35ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
36ARG REPOSITORY=testing
37
38RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
Mike Marchetti13d76c82018-09-19 15:00:36 -040039RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} MON common" && apt update
Mike Marchetti182bd732018-09-05 09:52:42 -040040
Mike Marchetti13d76c82018-09-19 15:00:36 -040041ARG MON_VERSION
42ARG COMMON_VERSION
Mike Marchetti182bd732018-09-05 09:52:42 -040043
Mike Marchetti13d76c82018-09-19 15:00:36 -040044RUN apt-get --yes update && apt-get -y install python3-osm-common${COMMON_VERSION} python3-osm-mon${MON_VERSION}
Mike Marchetti182bd732018-09-05 09:52:42 -040045
46COPY scripts/ scripts/
47
Benjamin Diaz034df702018-10-08 17:16:47 -030048ENV BROKER_URI kafka:9092
49ENV MONGO_URI mongo:27017
50ENV DATABASE sqlite:///mon_sqlite.db
51ENV OS_NOTIFIER_URI localhost:8662
52ENV OS_DEFAULT_GRANULARITY 300
53ENV REQUEST_TIMEOUT 10
Mike Marchetti182bd732018-09-05 09:52:42 -040054
55EXPOSE 8662
56
57CMD /bin/bash scripts/runInstall.sh