Loading src/nbi/Dockerfile +16 −19 Original line number Diff line number Diff line Loading @@ -16,9 +16,24 @@ FROM python:3.9-slim # Install dependencies RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install wget g++ git && \ apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* # Download, build and install libyang. Note that APT package is outdated # - Ref: https://github.com/CESNET/libyang # - Ref: https://github.com/CESNET/libyang-python/ RUN mkdir -p /var/libyang RUN git clone https://github.com/CESNET/libyang.git /var/libyang WORKDIR /var/libyang RUN git fetch RUN git checkout v2.1.148 RUN mkdir -p /var/libyang/build WORKDIR /var/libyang/build RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. RUN make RUN make install RUN ldconfig # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 Loading Loading @@ -53,24 +68,6 @@ RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Download, build and install libyang. Note that APT package is outdated # - Ref: https://github.com/CESNET/libyang # - Ref: https://github.com/CESNET/libyang-python/ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/libyang RUN git clone https://github.com/CESNET/libyang.git /var/libyang WORKDIR /var/libyang RUN git fetch RUN git checkout v2.1.148 RUN mkdir -p /var/libyang/build WORKDIR /var/libyang/build RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. RUN make RUN make install RUN ldconfig # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/nbi WORKDIR /var/teraflow/nbi Loading Loading
src/nbi/Dockerfile +16 −19 Original line number Diff line number Diff line Loading @@ -16,9 +16,24 @@ FROM python:3.9-slim # Install dependencies RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install wget g++ git && \ apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* # Download, build and install libyang. Note that APT package is outdated # - Ref: https://github.com/CESNET/libyang # - Ref: https://github.com/CESNET/libyang-python/ RUN mkdir -p /var/libyang RUN git clone https://github.com/CESNET/libyang.git /var/libyang WORKDIR /var/libyang RUN git fetch RUN git checkout v2.1.148 RUN mkdir -p /var/libyang/build WORKDIR /var/libyang/build RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. RUN make RUN make install RUN ldconfig # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 Loading Loading @@ -53,24 +68,6 @@ RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; # Download, build and install libyang. Note that APT package is outdated # - Ref: https://github.com/CESNET/libyang # - Ref: https://github.com/CESNET/libyang-python/ RUN apt-get --yes --quiet --quiet update && \ apt-get --yes --quiet --quiet install build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/libyang RUN git clone https://github.com/CESNET/libyang.git /var/libyang WORKDIR /var/libyang RUN git fetch RUN git checkout v2.1.148 RUN mkdir -p /var/libyang/build WORKDIR /var/libyang/build RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. RUN make RUN make install RUN ldconfig # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/nbi WORKDIR /var/teraflow/nbi Loading