| garciadeblas | 0cb7df3 | 2018-02-07 03:22:37 +0100 | [diff] [blame] | 1 | from ubuntu:xenial |
| 2 | |
| 3 | MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com> |
| 4 | |
| 5 | #avoid extra information from packages |
| 6 | RUN echo 'path-exclude /usr/share/doc/*\n\ |
| 7 | path-include /usr/share/doc/*/copyright\n\ |
| 8 | path-exclude /usr/share/man/*\n\ |
| 9 | path-exclude /usr/share/groff/*\n\ |
| 10 | path-exclude /usr/share/info/*\n\ |
| 11 | path-exclude /usr/share/lintian/*\n\ |
| 12 | path-exclude /usr/share/linda/*\n'\ |
| 13 | > /etc/dpkg/dpkg.cfg.d/01_nodoc && \ |
| 14 | echo 'APT::Install-Recommends "false";\n\ |
| 15 | APT::AutoRemove::RecommendsImportant "false";\n\ |
| 16 | APT::AutoRemove::SuggestsImportant "false";\n'\ |
| 17 | > /etc/apt/apt.conf.d/99_norecommends |
| 18 | |
| 19 | |
| garciadeblas | c9cba06 | 2018-04-17 18:06:23 +0200 | [diff] [blame] | 20 | RUN apt-get update && apt-get install -y curl mysql-client software-properties-common \ |
| garciadeblas | 0cb7df3 | 2018-02-07 03:22:37 +0100 | [diff] [blame] | 21 | && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable SO UI RO IM osmclient openvim" \ |
| 22 | && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \ |
| garciadeblas | c9cba06 | 2018-04-17 18:06:23 +0200 | [diff] [blame] | 23 | && apt-get update \ |
| 24 | && apt-get install -y python-osm-ro \ |
| garciadeblas | 0cb7df3 | 2018-02-07 03:22:37 +0100 | [diff] [blame] | 25 | && rm -rf /var/lib/apt/lists/* \ |
| 26 | && mkdir -p /bin/RO |
| 27 | |
| 28 | |
| garciadeblas | 0cb7df3 | 2018-02-07 03:22:37 +0100 | [diff] [blame] | 29 | VOLUME /opt/openmano/logs |
| 30 | |
| 31 | EXPOSE 9090 |
| 32 | |
| 33 | # Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers |
| 34 | # These ENV must be provided |
| 35 | ENV RO_DB_HOST="" |
| 36 | ENV RO_DB_OVIM_HOST="" |
| 37 | # if empty RO_DB_HOST is assumed |
| 38 | |
| 39 | # These ENV should be provided first time for creating database. It will create and init only if empty! |
| 40 | ENV RO_DB_ROOT_PASSWORD="" |
| 41 | ENV RO_DB_OVIM_ROOT_PASSWORD="" |
| 42 | # if empty RO_DB_ROOT_PASSWORD is assumed |
| 43 | |
| 44 | # These ENV can be provided, but default values are ok |
| 45 | ENV RO_DB_USER=mano |
| 46 | ENV RO_DB_OVIM_USER=mano |
| 47 | ENV RO_DB_PASSWORD=manopw |
| 48 | ENV RO_DB_OVIM_PASSWORD=manopw |
| 49 | ENV RO_DB_PORT=3306 |
| 50 | ENV RO_DB_OVIM_PORT=3306 |
| 51 | ENV RO_DB_NAME=mano_db |
| 52 | ENV RO_DB_OVIM_NAME=mano_vim_db |
| 53 | |
| 54 | |
| tierno | af0017f | 2018-09-12 16:25:42 +0200 | [diff] [blame] | 55 | CMD RO-start.sh |
| garciadeblas | 0cb7df3 | 2018-02-07 03:22:37 +0100 | [diff] [blame] | 56 | |