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