| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 1 | # This creates som/LCM docker from from last stable package |
| 2 | |
| 3 | FROM ubuntu:16.04 |
| 4 | |
| 5 | # Set the working directory to /app |
| 6 | WORKDIR /app/osm_lcm |
| 7 | |
| 8 | # avoid extra information from packages |
| 9 | RUN echo 'path-exclude /usr/share/doc/*\n\ |
| 10 | path-include /usr/share/doc/*/copyright\n\ |
| 11 | path-exclude /usr/share/man/*\n\ |
| 12 | path-exclude /usr/share/groff/*\n\ |
| 13 | path-exclude /usr/share/info/*\n\ |
| 14 | path-exclude /usr/share/lintian/*\n\ |
| 15 | path-exclude /usr/share/linda/*\n'\ |
| 16 | > /etc/dpkg/dpkg.cfg.d/01_nodoc && \ |
| 17 | echo 'APT::Install-Recommends "false";\n\ |
| 18 | APT::AutoRemove::RecommendsImportant "false";\n\ |
| 19 | APT::AutoRemove::SuggestsImportant "false";\n'\ |
| 20 | > /etc/apt/apt.conf.d/99_norecommends |
| 21 | |
| 22 | |
| 23 | RUN 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 | |
| 29 | EXPOSE 9999 |
| 30 | |
| 31 | LABEL 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 |
| 37 | VOLUME /app/storage |
| 38 | # Used for logs |
| 39 | VOLUME /app/log |
| 40 | |
| 41 | # The following ENV can be added with "docker run -e xxx' to configure LCM |
| 42 | ENV OSMLCM_RO_HOST ro |
| 43 | ENV OSMLCM_RO_PORT 9090 |
| 44 | ENV OSMLCM_RO_TENANT osm |
| 45 | |
| 46 | # VCA |
| 47 | ENV OSMLCM_VCA_HOST vca |
| 48 | ENV OSMLCM_VCA_PORT: 17070 |
| 49 | ENV OSMLCM_VCA_USER: admin |
| 50 | ENV OSMLCM_VCA_SECRET: secret |
| 51 | |
| 52 | # database |
| 53 | ENV OSMLCM_DATABASE_DRIVER mongo |
| 54 | ENV OSMLCM_DATABASE_HOST mongo |
| 55 | ENV OSMLCM_DATABASE_PORT 27017 |
| 56 | ENV OSMLCM_STORAGE_DRIVER local |
| 57 | ENV OSMLCM_STORAGE_PATH /app/storage |
| 58 | |
| 59 | # message |
| 60 | ENV OSMLCM_MESSAGE_DRIVER kafka |
| 61 | ENV OSMLCM_MESSAGE_HOST kafka |
| 62 | ENV OSMLCM_MESSAGE_PORT 9092 |
| 63 | |
| 64 | # Run app.py when the container launches |
| 65 | CMD ["python3", "lcm.py"] |