blob: 6b5c15ffcd4c3ce0cd9d3c4573121b70bb8869cd [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
garciadeblas56e0be72024-07-09 14:30:15 +020016FROM ubuntu:22.04
17
18RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
19 DEBIAN_FRONTEND=noninteractive apt-get --yes install \
20 python3=3.10.* \
21 python3-pip=22.0.* \
22 && rm -rf /var/lib/apt/lists/*
23
24# gcc=4:11.* \
25# python3-dev=3.10.* \
26# curl=7.81.* \
lloretgalleg1d2ff512020-08-01 06:05:58 +000027
28# Set the working directory to /app
29WORKDIR /app/EE
30
31# Libraries used by the base osm defined ee
32RUN apt-get update && apt-get install -y git python3 python3-pip \
garciadeblas56e0be72024-07-09 14:30:15 +020033 && python3 -m pip install --upgrade pip
lloretgalleg1d2ff512020-08-01 06:05:58 +000034
aguilarhernaf9a41d82022-03-21 09:10:45 +000035# Libraries used by the vnf: asyncssh, ansible
36#RUN apt-get update && apt-get install software-properties-common \
37# && apt-add-repository --yes --update ppa:ansible/ansible \
38# && apt install ansible \
39# && python3 -m pip install asyncssh
40#RUN apt-get update \
41# && python3 -m pip install asyncssh
42
lloretgalleg1d2ff512020-08-01 06:05:58 +000043# Copy the current directory contents into the container at /app/LCM
44ADD . /app/EE
45
46# Install as module
garciadeblas56e0be72024-07-09 14:30:15 +020047RUN python3 -m pip install -e /app/EE -r /app/EE/requirements.txt
lloretgalleg1d2ff512020-08-01 06:05:58 +000048
49# Install SNMP Generator and its dependencies
50#RUN apt-get install -y python3-pip unzip build-essential libsnmp-dev wget curl
51#RUN curl -s https://storage.googleapis.com/golang/go1.11.8.linux-amd64.tar.gz| tar -v -C /usr/local -xz
52#ENV PATH $PATH:/usr/local/go/bin
53#ENV GOPATH /go
54#RUN go get github.com/go-logfmt/logfmt \
55# && go get github.com/go-kit/kit/log
56#RUN wget -q https://github.com/prometheus/snmp_exporter/archive/v0.17.0.tar.gz -P /tmp/ \
57# && tar -C /tmp -xf /tmp/v0.17.0.tar.gz \
58# && (cd /tmp/snmp_exporter-0.17.0/generator && go build) \
59# && cp /tmp/snmp_exporter-0.17.0/generator/generator /usr/local/bin/snmp_generator
60
61EXPOSE 50051
62
63#CMD python3 -m osm_ee.frontend_server
64# For development
65CMD [ "bash", "-c", "while true; do /app/EE/osm_ee/scripts/ee_start.sh ; sleep 5; done" ]