blob: 698ec9caaaa5ad76ad2708d8c27affa50ca713ba [file] [log] [blame]
tiernof3c4dbc2018-02-05 14:53:28 +01001FROM 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
Adam Israel354ead92018-03-18 14:46:23 -04009RUN apt-get update && apt-get install -y git python3 \
tiernof3c4dbc2018-02-05 14:53:28 +010010 python3-pip python3-pymongo python3-yaml python3-aiohttp \
Adam Israel354ead92018-03-18 14:46:23 -040011 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 -U aiokafka pyang lxml six enum34
tiernof3c4dbc2018-02-05 14:53:28 +010015
Adam Israel354ead92018-03-18 14:46:23 -040016RUN git clone https://osm.etsi.org/gerrit/osm/N2VC.git \
17 && cd N2VC \
Adam Israel354ead92018-03-18 14:46:23 -040018 && cd modules/libjuju && python3 setup.py develop && cd ../.. \
19 && pip3 install -U -r requirements.txt \
20 && python3 setup.py develop \
21 && cd ..
22
23RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
tiernof3c4dbc2018-02-05 14:53:28 +010024
25
26LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
27 Description="This implements a north bound interface for OSM" \
tiernoae501922018-02-06 23:17:16 +010028 Version="1.0" \
29 Author="Alfonso Tierno"
tiernof3c4dbc2018-02-05 14:53:28 +010030
31# Used for local storage
32VOLUME /app/storage
33# Used for logs
34VOLUME /app/log
35
36# The following ENV can be added with "docker run -e xxx' to configure
37# RO
38ENV OSMLCM_RO_HOST ro
39ENV OSMLCM_RO_PORT 9090
40ENV OSMLCM_RO_TENANT osm
41
42# VCA
43ENV OSMLCM_VCA_HOST vca
44ENV OSMLCM_VCA_PORT: 17070
45ENV OSMLCM_VCA_USER: admin
46ENV OSMLCM_VCA_SECRET: secret
47
48# database
49ENV OSMLCM_DATABASE_DRIVER mongo
50ENV OSMLCM_DATABASE_HOST mongo
51ENV OSMLCM_DATABASE_PORT 27017
52ENV OSMLCM_STORAGE_DRIVER local
53ENV OSMLCM_STORAGE_PATH /app/storage
54
55# message
56ENV OSMLCM_MESSAGE_DRIVER kafka
57ENV OSMLCM_MESSAGE_HOST kafka
58ENV OSMLCM_MESSAGE_PORT 9092
59
60ENV PYTHONPATH /app/osm_common
61# Run app.py when the container launches
62CMD ["python3", "lcm.py"]