MAINTAINER Gennadiy Dubina <gennadiy.dubina@dataat.com>; Alfonso Tierno <alfonso.tiernosepulveda@telefoncia.com>
RUN apt-get update && apt-get -y install curl software-properties-common git
-RUN apt-get update && apt-get install -y python-setuptools python-wheel mysql-client python-bitarray
+RUN DEBIAN_FRONTEND=noninteractive add-apt-repository -y cloud-archive:queens
+RUN apt-get update && apt-get install -y python-setuptools python-wheel mysql-client python-bitarray python-pip
+RUN DEBIAN_FRONTEND=noninteractive pip2 install pip==9.0.3 pyangbind
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
ARG RELEASE=ReleaseFOUR-daily
RUN apt-get update && apt-get install -y python-osm-ro${RO_VERSION} python-osm-im${IM_VERSION}
-RUN mkdir -p /bin/RO
-COPY scripts/ /bin/RO
-
-VOLUME /opt/openmano/logs
+VOLUME /var/log/osm
EXPOSE 9090
ENV RO_DB_NAME=mano_db
ENV RO_DB_OVIM_NAME=mano_vim_db
-CMD /bin/RO/start.sh
+HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \
+ CMD curl --silent --fail localhost:9090/openmano/tenants || exit 1
+CMD /usr/bin/RO-start.sh
+