Fix LF CI integration.
[sim/o1-interface.git] / ntsimulator / deploy / Dockerfile
index b5457b5..4e81018 100644 (file)
@@ -1,3 +1,19 @@
+################################################################################
+#
+# Copyright 2019 highstreet technologies GmbH and others
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
 FROM ubuntu:18.04
 
 MAINTAINER alexandru.stancu@highstreet-technologies.com
@@ -58,8 +74,8 @@ RUN mkdir /opt/dev
 WORKDIR /opt/dev
 
 # libcjson
-COPY ./cJSON /opt/dev/cJSON
 RUN \
+         git clone https://github.com/Melacon/cJSON.git && \
       cd cJSON && mkdir build && cd build && \
       cmake .. -DENABLE_CJSON_UTILS=On -DENABLE_CJSON_TEST=Off -DCMAKE_INSTALL_PREFIX=/usr .. && \
       make -j2 && \
@@ -67,8 +83,8 @@ RUN \
       ldconfig
 
 # libyang
-COPY ./libyang /opt/dev/libyang
 RUN \
+         git clone https://github.com/Melacon/libyang.git && \
       cd libyang && mkdir build && cd build && \
       cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
       make -j2 && \
@@ -76,8 +92,8 @@ RUN \
       ldconfig
 
 # sysrepo
-COPY ./sysrepo /opt/dev/sysrepo
 RUN \
+         git clone https://github.com/Melacon/sysrepo.git && \
       sed -i 's/#define MAX_BLOCKS_AVAIL_FOR_ALLOC    3/#define MAX_BLOCKS_AVAIL_FOR_ALLOC    6/g' ./sysrepo/src/common/sr_mem_mgmt.h && \
       cd sysrepo && mkdir build && cd build && \
       cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo -DREQUEST_TIMEOUT=60 -DOPER_DATA_PROVIDE_TIMEOUT=60 .. && \
@@ -86,8 +102,8 @@ RUN \
       ldconfig
 
 # libnetconf2
-COPY ./libnetconf2 /opt/dev/libnetconf2
 RUN \
+         git clone https://github.com/Melacon/libnetconf2.git && \
       cd libnetconf2 && mkdir build && cd build && \
       cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
       make -j2 && \
@@ -95,9 +111,9 @@ RUN \
       ldconfig
 
 # keystore
-COPY ./Netopeer2 /opt/dev/Netopeer2
 RUN \
-      cd /opt/dev && \
+         cd /opt/dev && \
+         git clone https://github.com/Melacon/Netopeer2.git && \
       cd Netopeer2 && \
       cd keystored && mkdir build && cd build && \
       cmake -DCMAKE_BUILD_TYPE:String="Release" .. && \
@@ -120,14 +136,15 @@ RUN \
       make install
 
 RUN pip install rstr && pip install exrex && pip install ipaddress
-         
-COPY ./pyang /opt/dev/pyang
+        
+# pyang 
 RUN \
          cd /opt/dev && \
+         git clone https://github.com/Melacon/pyang.git && \
          cd pyang && python setup.py build && python setup.py install
          
 #NTSimulator Manager - notifications
-COPY ./ntsimulator /opt/dev/ntsimulator
+COPY . /opt/dev/ntsimulator
 RUN \
       cd /opt/dev && \
       cd ntsimulator && mkdir build  && cd build && \
@@ -135,11 +152,11 @@ RUN \
       make -j2&& \
       make install
 
-COPY ntsimulator/deploy/supervisord.conf /etc/supervisord.conf
+COPY deploy/supervisord.conf /etc/supervisord.conf
 
-COPY ./ntsimulator/scripts/tls /home/netconf/.ssh
+COPY ./scripts/tls /home/netconf/.ssh
 
-COPY ./ntsimulator/yang /opt/dev/yang
+COPY ./yang /opt/dev/yang
 WORKDIR /opt/dev
 RUN \
          cd yang && \