blob: b603c13e17fe796bc59c27e494f072af68ec2f7b [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
garciadeblasaa7d0772018-02-06 15:46:30 +01009RUN apt-get update && apt-get install -y git python3 \
tiernof3c4dbc2018-02-05 14:53:28 +010010 python3-pip python3-pymongo python3-yaml python3-aiohttp \
tiernoae501922018-02-06 23:17:16 +010011 && pip3 install aiokafka juju \
tiernof3c4dbc2018-02-05 14:53:28 +010012 && mkdir -p /app/storage/kafka && mkdir -p /app/log
13
14
15
16LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
17 Description="This implements a north bound interface for OSM" \
tiernoae501922018-02-06 23:17:16 +010018 Version="1.0" \
19 Author="Alfonso Tierno"
tiernof3c4dbc2018-02-05 14:53:28 +010020
21# Used for local storage
22VOLUME /app/storage
23# Used for logs
24VOLUME /app/log
25
26# The following ENV can be added with "docker run -e xxx' to configure
27# RO
28ENV OSMLCM_RO_HOST ro
29ENV OSMLCM_RO_PORT 9090
30ENV OSMLCM_RO_TENANT osm
31
32# VCA
33ENV OSMLCM_VCA_HOST vca
34ENV OSMLCM_VCA_PORT: 17070
35ENV OSMLCM_VCA_USER: admin
36ENV OSMLCM_VCA_SECRET: secret
37
38# database
39ENV OSMLCM_DATABASE_DRIVER mongo
40ENV OSMLCM_DATABASE_HOST mongo
41ENV OSMLCM_DATABASE_PORT 27017
42ENV OSMLCM_STORAGE_DRIVER local
43ENV OSMLCM_STORAGE_PATH /app/storage
44
45# message
46ENV OSMLCM_MESSAGE_DRIVER kafka
47ENV OSMLCM_MESSAGE_HOST kafka
48ENV OSMLCM_MESSAGE_PORT 9092
49
50ENV PYTHONPATH /app/osm_common
51# Run app.py when the container launches
52CMD ["python3", "lcm.py"]
53