anchor.diff:  FROM centos:6.6
   
  -MAINTAINER David 
  +MAINTAINER David
   
   ENV GIT_URL_IOTACPP https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus.git
   ENV GIT_REV_IOTACPP develop
  
positive.code:     git clone ${GIT_URL_IOTACPP} ${GIT_PATH_IOTACPP} && \
      cd ${GIT_PATH_IOTACPP} && \
      sed -i CMakeLists.txt \
      	-e 's|^add_test|#add_test|g' \
      -e 's|^add_subdirectory(tests)|#add_subdirectory(tests)|g' \
      -e 's|^enable_testing|#enable_testing|g' \
          -e 's|git@github.com:mongodb/mongo-cxx-driver.git|https://github.com/mongodb/mongo-cxx-driver|g' && \
  
negative.code:          perl-Error perl-Git perl-Module-Pluggable \
           perl-Pod-Escapes perl-Pod-Simple \
           perl-libs perl-version  \
           ppl rsync && \
  
      cd ${GIT_PATH_IOTACPP} && \
      cd build/${IOTACPP_BUILD_TYPE} && \
      cd pack/Linux/RPM && \
      curl -kOL http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-6/home:oojah:mqtt.repo && \
      mv home:oojah:mqtt.repo /etc/yum.repos.d/ && \
      yum localinstall -y iot-agent-*.rpm && \
      yum clean all && \
      chkconfig iotagent on && \
  
      chkconfig mosquitto on
  
  COPY config.json /etc/iot/
  COPY iotagent_manager.conf /usr/local/iot/config/
  COPY iotagent_protocol.conf /usr/local/iot/config/
  COPY docker-entrypoint.sh /
  
  RUN \
      chmod +x ${GIT_PATH_IOTACPP}/scripts/*.sh && \
      chown ${IOTACPP_USER}:${IOTACPP_USER} /etc/iot/config.json && \
      chown ${IOTACPP_USER}:${IOTACPP_USER} /usr/local/iot/config/iotagent_manager.conf && \
      chown ${IOTACPP_USER}:${IOTACPP_USER} /usr/local/iot/config/iotagent_protocol.conf && \
      chmod +x /docker-entrypoint.sh
  
  ENTRYPOINT ["/docker-entrypoint.sh"]
  
  EXPOSE 8080
  