blob: 62702f20377ae67e328cdb15f938849a0320b7d1 [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
aguilarhernaf9a41d82022-03-21 09:10:45 +000028# Libraries used by the vnf: asyncssh, ansible
29#RUN apt-get update && apt-get install software-properties-common \
30# && apt-add-repository --yes --update ppa:ansible/ansible \
31# && apt install ansible \
32# && python3 -m pip install asyncssh
33#RUN apt-get update \
34# && python3 -m pip install asyncssh
35
lloretgalleg1d2ff512020-08-01 06:05:58 +000036# Copy the current directory contents into the container at /app/LCM
37ADD . /app/EE
38
39# Install as module
40RUN python3 -m pip install -e /app/EE
41
42# Install SNMP Generator and its dependencies
43#RUN apt-get install -y python3-pip unzip build-essential libsnmp-dev wget curl
44#RUN curl -s https://storage.googleapis.com/golang/go1.11.8.linux-amd64.tar.gz| tar -v -C /usr/local -xz
45#ENV PATH $PATH:/usr/local/go/bin
46#ENV GOPATH /go
47#RUN go get github.com/go-logfmt/logfmt \
48# && go get github.com/go-kit/kit/log
49#RUN wget -q https://github.com/prometheus/snmp_exporter/archive/v0.17.0.tar.gz -P /tmp/ \
50# && tar -C /tmp -xf /tmp/v0.17.0.tar.gz \
51# && (cd /tmp/snmp_exporter-0.17.0/generator && go build) \
52# && cp /tmp/snmp_exporter-0.17.0/generator/generator /usr/local/bin/snmp_generator
53
54EXPOSE 50051
55
56#CMD python3 -m osm_ee.frontend_server
57# For development
58CMD [ "bash", "-c", "while true; do /app/EE/osm_ee/scripts/ee_start.sh ; sleep 5; done" ]