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