fix(sapd): sapd used to specify exposed connections at NS level. Fixes Bug 1321
[osm/LCM.git] / Dockerfile.fromdeb
1 # 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
16 # This creates som/LCM docker from from last stable package
17
18 FROM ubuntu:16.04
19
20 # Set the working directory to /app
21 WORKDIR /app/osm_lcm
22
23 # avoid extra information from packages
24 RUN echo 'path-exclude /usr/share/doc/*\n\
25 path-include /usr/share/doc/*/copyright\n\
26 path-exclude /usr/share/man/*\n\
27 path-exclude /usr/share/groff/*\n\
28 path-exclude /usr/share/info/*\n\
29 path-exclude /usr/share/lintian/*\n\
30 path-exclude /usr/share/linda/*\n'\
31 > /etc/dpkg/dpkg.cfg.d/01_nodoc && \
32     echo  'APT::Install-Recommends "false";\n\
33 APT::AutoRemove::RecommendsImportant "false";\n\
34 APT::AutoRemove::SuggestsImportant "false";\n'\
35 > /etc/apt/apt.conf.d/99_norecommends
36
37
38 RUN 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
44 EXPOSE 9999
45
46 LABEL 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
52 VOLUME /app/storage
53 # Used for logs
54 VOLUME /app/log
55
56 # The following ENV can be added with "docker run -e xxx' to configure LCM
57 ENV OSMLCM_RO_HOST         ro
58 ENV OSMLCM_RO_PORT         9090
59 ENV OSMLCM_RO_TENANT       osm
60
61 # VCA
62 ENV OSMLCM_VCA_HOST        vca
63 ENV OSMLCM_VCA_PORT:       17070
64 ENV OSMLCM_VCA_USER:       admin
65 ENV OSMLCM_VCA_SECRET:     secret
66 ENV OSMLCM_VCA_CLOUD:      localhost
67
68 # database
69 ENV OSMLCM_DATABASE_DRIVER mongo
70 ENV OSMLCM_DATABASE_HOST   mongo
71 ENV OSMLCM_DATABASE_PORT   27017
72 ENV OSMLCM_STORAGE_DRIVER  local
73 ENV OSMLCM_STORAGE_PATH    /app/storage
74
75 # message
76 ENV OSMLCM_MESSAGE_DRIVER  kafka
77 ENV OSMLCM_MESSAGE_HOST    kafka
78 ENV OSMLCM_MESSAGE_PORT    9092
79
80 # Run app.py when the container launches
81 CMD ["python3", "lcm.py"]