1 # Copyright 2018 Telefonica S.A.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # This creates som/LCM docker from from last stable package
20 # Set the working directory to /app
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
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/*
46 LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
47 Description="This implements life cycle management engine for OSM" \
49 Author="Alfonso Tierno"
51 # Used for local storage
56 # The following ENV can be added with "docker run -e xxx' to configure LCM
58 ENV OSMLCM_RO_PORT 9090
59 ENV OSMLCM_RO_TENANT osm
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
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
76 ENV OSMLCM_MESSAGE_DRIVER kafka
77 ENV OSMLCM_MESSAGE_HOST kafka
78 ENV OSMLCM_MESSAGE_PORT 9092
80 # Run app.py when the container launches
81 CMD ["python3", "lcm.py"]