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