blob: c2a3b48e28f2606d2316aa9626b3deab4964a435 [file] [log] [blame]
tiernoc0e42e22018-05-11 11:36:10 +02001FROM ubuntu:16.04
2
3# Set the working directory to /app
4WORKDIR /app/osm_lcm
5
6# Copy the current directory contents into the container at /app
7ADD . /app
8
9RUN apt-get update && apt-get install -y git python3 \
10 python3-pip python3-pymongo python3-yaml python3-aiohttp \
11 python3-stdeb python3-setuptools python3-all python-all \
12 python3-bitarray python3-regex python3-lxml debhelper dh-python tox wget \
13 python3-cffi \
14 && pip3 install pip==9.0.3 \
15 && pip3 install -U aiokafka pyang lxml six enum34
16
17RUN git clone https://osm.etsi.org/gerrit/osm/N2VC.git \
18 && cd N2VC \
19 && cd modules/libjuju && python3 setup.py develop && cd ../.. \
20 && pip3 install -U -r requirements.txt \
21 && python3 setup.py develop \
22 && cd ..
23
24RUN git clone https://osm.etsi.org/gerrit/osm/common.git \
25 && cd common && python3 setup.py develop && cd ..
26# && pip3 install -U -r requirements.txt \
27# && cd ..
28
29RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
30
31
32LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
33 Description="This implements a north bound interface for OSM" \
34 Version="1.0" \
35 Author="Alfonso Tierno"
36
37# Used for local storage
38VOLUME /app/storage
39# Used for logs
40VOLUME /app/log
41
42# The following ENV can be added with "docker run -e xxx' to configure LCM
43ENV OSMLCM_RO_HOST ro
44ENV OSMLCM_RO_PORT 9090
45ENV OSMLCM_RO_TENANT osm
46
47# VCA
48ENV OSMLCM_VCA_HOST vca
49ENV OSMLCM_VCA_PORT: 17070
50ENV OSMLCM_VCA_USER: admin
51ENV OSMLCM_VCA_SECRET: secret
52
53# database
54ENV OSMLCM_DATABASE_DRIVER mongo
55ENV OSMLCM_DATABASE_HOST mongo
56ENV OSMLCM_DATABASE_PORT 27017
57ENV OSMLCM_STORAGE_DRIVER local
58ENV OSMLCM_STORAGE_PATH /app/storage
59
60# message
61ENV OSMLCM_MESSAGE_DRIVER kafka
62ENV OSMLCM_MESSAGE_HOST kafka
63ENV OSMLCM_MESSAGE_PORT 9092
64
65# Run app.py when the container launches
66CMD ["python3", "lcm.py"]