blob: d811e1a0662f61b1ebca4bcad0d52810dd6ef940 [file] [log] [blame]
lloretgalleg1d2ff512020-08-01 06:05:58 +00001# Copyright 2018 Telefonica S.A.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16FROM ubuntu:18.04
17
18# Set the working directory to /app
19WORKDIR /app/EE
20
21# Libraries used by the base osm defined ee
22RUN apt-get update && apt-get install -y git python3 python3-pip \
23 && python3 -m pip install --upgrade pip \
24 && python3 -m pip install -U grpcio-tools \
25 && python3 -m pip install -U grpclib \
26 && python3 -m pip install -U PyYAML
27
28# Copy the current directory contents into the container at /app/LCM
29ADD . /app/EE
30
31# Install as module
32RUN python3 -m pip install -e /app/EE
33
34# Install SNMP Generator and its dependencies
35#RUN apt-get install -y python3-pip unzip build-essential libsnmp-dev wget curl
36#RUN curl -s https://storage.googleapis.com/golang/go1.11.8.linux-amd64.tar.gz| tar -v -C /usr/local -xz
37#ENV PATH $PATH:/usr/local/go/bin
38#ENV GOPATH /go
39#RUN go get github.com/go-logfmt/logfmt \
40# && go get github.com/go-kit/kit/log
41#RUN wget -q https://github.com/prometheus/snmp_exporter/archive/v0.17.0.tar.gz -P /tmp/ \
42# && tar -C /tmp -xf /tmp/v0.17.0.tar.gz \
43# && (cd /tmp/snmp_exporter-0.17.0/generator && go build) \
44# && cp /tmp/snmp_exporter-0.17.0/generator/generator /usr/local/bin/snmp_generator
45
46EXPOSE 50051
47
48#CMD python3 -m osm_ee.frontend_server
49# For development
50CMD [ "bash", "-c", "while true; do /app/EE/osm_ee/scripts/ee_start.sh ; sleep 5; done" ]