blob: d49995ac60b4204b106e4ffbdf32980e0b654684 [file] [log] [blame]
tierno2e215512018-11-28 09:37:52 +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
tiernoc0e42e22018-05-11 11:36:10 +020016# This creates som/LCM docker from from last stable package
17
18FROM ubuntu:16.04
19
20# Set the working directory to /app
21WORKDIR /app/osm_lcm
22
23# avoid extra information from packages
24RUN echo 'path-exclude /usr/share/doc/*\n\
25path-include /usr/share/doc/*/copyright\n\
26path-exclude /usr/share/man/*\n\
27path-exclude /usr/share/groff/*\n\
28path-exclude /usr/share/info/*\n\
29path-exclude /usr/share/lintian/*\n\
30path-exclude /usr/share/linda/*\n'\
31> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
32 echo 'APT::Install-Recommends "false";\n\
33APT::AutoRemove::RecommendsImportant "false";\n\
34APT::AutoRemove::SuggestsImportant "false";\n'\
35> /etc/apt/apt.conf.d/99_norecommends
36
37
38RUN apt-get update && apt-get install -y curl software-properties-common \
39 && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR testing common LCM" \
40 && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseFOUR/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \
41 && apt-get update && apt-get install -y python3-osm-lcm python3-osm-common \
42 && rm -rf /var/lib/apt/lists/*
43
44EXPOSE 9999
45
46LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
47 Description="This implements life cycle management engine for OSM" \
48 Version="1.0" \
49 Author="Alfonso Tierno"
50
51# Used for local storage
52VOLUME /app/storage
53# Used for logs
54VOLUME /app/log
55
56# The following ENV can be added with "docker run -e xxx' to configure LCM
57ENV OSMLCM_RO_HOST ro
58ENV OSMLCM_RO_PORT 9090
59ENV OSMLCM_RO_TENANT osm
60
61# VCA
62ENV OSMLCM_VCA_HOST vca
63ENV OSMLCM_VCA_PORT: 17070
64ENV OSMLCM_VCA_USER: admin
65ENV OSMLCM_VCA_SECRET: secret
66
67# database
68ENV OSMLCM_DATABASE_DRIVER mongo
69ENV OSMLCM_DATABASE_HOST mongo
70ENV OSMLCM_DATABASE_PORT 27017
71ENV OSMLCM_STORAGE_DRIVER local
72ENV OSMLCM_STORAGE_PATH /app/storage
73
74# message
75ENV OSMLCM_MESSAGE_DRIVER kafka
76ENV OSMLCM_MESSAGE_HOST kafka
77ENV OSMLCM_MESSAGE_PORT 9092
78
79# Run app.py when the container launches
80CMD ["python3", "lcm.py"]