--- /dev/null
+from ubuntu:xenial
+
+MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com>
+
+#avoid extra information from packages
+RUN echo 'path-exclude /usr/share/doc/*\n\
+path-include /usr/share/doc/*/copyright\n\
+path-exclude /usr/share/man/*\n\
+path-exclude /usr/share/groff/*\n\
+path-exclude /usr/share/info/*\n\
+path-exclude /usr/share/lintian/*\n\
+path-exclude /usr/share/linda/*\n'\
+> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
+ echo 'APT::Install-Recommends "false";\n\
+APT::AutoRemove::RecommendsImportant "false";\n\
+APT::AutoRemove::SuggestsImportant "false";\n'\
+> /etc/apt/apt.conf.d/99_norecommends
+
+
+RUN apt update && apt install -y curl mysql-client software-properties-common \
+ && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable SO UI RO IM osmclient openvim" \
+ && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \
+ && apt update \
+ && apt install -y python-osm-ro \
+ && rm -rf /var/lib/apt/lists/* \
+ && mkdir -p /bin/RO
+
+
+COPY docker/scripts/ /bin/RO
+
+VOLUME /opt/openmano/logs
+
+EXPOSE 9090
+
+# Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers
+# These ENV must be provided
+ENV RO_DB_HOST=""
+ENV RO_DB_OVIM_HOST=""
+ # if empty RO_DB_HOST is assumed
+
+# These ENV should be provided first time for creating database. It will create and init only if empty!
+ENV RO_DB_ROOT_PASSWORD=""
+ENV RO_DB_OVIM_ROOT_PASSWORD=""
+ # if empty RO_DB_ROOT_PASSWORD is assumed
+
+# These ENV can be provided, but default values are ok
+ENV RO_DB_USER=mano
+ENV RO_DB_OVIM_USER=mano
+ENV RO_DB_PASSWORD=manopw
+ENV RO_DB_OVIM_PASSWORD=manopw
+ENV RO_DB_PORT=3306
+ENV RO_DB_OVIM_PORT=3306
+ENV RO_DB_NAME=mano_db
+ENV RO_DB_OVIM_NAME=mano_vim_db
+
+
+CMD /bin/RO/start.sh
+
from ubuntu:xenial
-MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com>
-
-#avoid extra information from packages
-RUN echo 'path-exclude /usr/share/doc/*\n\
-path-include /usr/share/doc/*/copyright\n\
-path-exclude /usr/share/man/*\n\
-path-exclude /usr/share/groff/*\n\
-path-exclude /usr/share/info/*\n\
-path-exclude /usr/share/lintian/*\n\
-path-exclude /usr/share/linda/*\n'\
-> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
- echo 'APT::Install-Recommends "false";\n\
-APT::AutoRemove::RecommendsImportant "false";\n\
-APT::AutoRemove::SuggestsImportant "false";\n'\
-> /etc/apt/apt.conf.d/99_norecommends
-
-
-RUN apt update && apt install -y curl mysql-client software-properties-common \
- && add-apt-repository -y "deb http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE stable SO UI RO IM osmclient openvim" \
- && curl "http://osm-download.etsi.org/repository/osm/debian/ReleaseTHREE/OSM%20ETSI%20Release%20Key.gpg" | apt-key add - \
- && apt update \
- && apt install -y python-osm-ro \
- && rm -rf /var/lib/apt/lists/* \
- && mkdir -p /bin/RO
+LABEL authors="Gennadiy Dubina, Alfonso Tierno, Gerardo Garcia"
+COPY . /root/RO
COPY docker/scripts/ /bin/RO
-VOLUME /opt/openmano/logs
+RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
+ apt-get update && \
+ DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:ocata && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install git make python python-pip debhelper && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install wget tox && \
+ DEBIAN_FRONTEND=noninteractive pip install -U pip && \
+ DEBIAN_FRONTEND=noninteractive pip install -U setuptools setuptools-version-command stdeb && \
+ DEBIAN_FRONTEND=noninteractive pip install -U pyang pyangbind && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-yaml python-netaddr python-boto && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-novaclient python-keystoneclient python-glanceclient python-cinderclient python-neutronclient && \
+ DEBIAN_FRONTEND=noninteractive pip install -U progressbar pyvmomi pyvcloud==18.2.2 && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-argcomplete python-bottle python-cffi python-packaging python-paramiko python-pkgconfig libmysqlclient-dev libssl-dev libffi-dev python-mysqldb && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-logutils python-openstackclient python-openstacksdk && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install python-bitarray && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client && \
+ mkdir -p /root/RO && \
+ make -C /root/RO clean all BRANCH=master && \
+ dpkg -i /root/RO/IM/deb_dist/python-pyang_*.deb && \
+ dpkg -i /root/RO/IM/deb_dist/python-pyangbind_*.deb && \
+ dpkg -i /root/RO/IM/deb_dist/python-osm-im*.deb && \
+ dpkg -i /root/RO/openvim/.build/python-lib-osm-openvim*.deb && \
+ dpkg -i /root/RO/.build/python-osm-ro*.deb && \
+ rm -rf /root/.cache && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/* && \
+ rm -rf /root/RO
+
+VOLUME /var/log/osm
EXPOSE 9090
# Two mysql databases are needed (DB and DB_OVIM). Can be hosted on same or separated containers
# These ENV must be provided
-ENV RO_DB_HOST=""
-ENV RO_DB_OVIM_HOST=""
- # if empty RO_DB_HOST is assumed
-
-# These ENV should be provided first time for creating database. It will create and init only if empty!
-ENV RO_DB_ROOT_PASSWORD=""
-ENV RO_DB_OVIM_ROOT_PASSWORD=""
- # if empty RO_DB_ROOT_PASSWORD is assumed
-
-# These ENV can be provided, but default values are ok
-ENV RO_DB_USER=mano
-ENV RO_DB_OVIM_USER=mano
-ENV RO_DB_PASSWORD=manopw
-ENV RO_DB_OVIM_PASSWORD=manopw
-ENV RO_DB_PORT=3306
-ENV RO_DB_OVIM_PORT=3306
-ENV RO_DB_NAME=mano_db
-ENV RO_DB_OVIM_NAME=mano_vim_db
+# RO_DB_HOST: host of the main
+# RO_DB_OVIM_HOST: ... if empty RO_DB_HOST is assumed
+# RO_DB_ROOT_PASSWORD: this has to be provided first time for creating database. It will create and init only if empty!
+# RO_DB_OVIM_ROOT_PASSWORD: ... if empty RO_DB_ROOT_PASSWORD is assumed
+# RO_DB_USER: default value 'mano'
+# RO_DB_OVIM_USER: default value 'mano'
+# RO_DB_PASSWORD: default value 'manopw'
+# RO_DB_OVIM_PASSWORD: default value 'manopw'
+# RO_DB_PORT: default value '3306'
+# RO_DB_OVIM_PORT: default value '3306'
+# RO_DB_NAME: default value 'mano_db'
+# RO_DB_OVIM_NAME: default value 'mano_vim_db'
+ENV RO_DB_HOST="" \
+ RO_DB_OVIM_HOST="" \
+ RO_DB_ROOT_PASSWORD="" \
+ RO_DB_OVIM_ROOT_PASSWORD="" \
+ RO_DB_USER=mano \
+ RO_DB_OVIM_USER=mano \
+ RO_DB_PASSWORD=manopw \
+ RO_DB_OVIM_PASSWORD=manopw \
+ RO_DB_PORT=3306 \
+ RO_DB_OVIM_PORT=3306 \
+ RO_DB_NAME=mano_db \
+ RO_DB_OVIM_NAME=mano_vim_db
CMD /bin/RO/start.sh