Sign inSign up

gabilm/sdn-iot-oscore_node

By gabilm

Updated over 3 years ago

Image
0

102

gabilm/sdn-iot-oscore_node repository overview

FROM ubuntu:22.04
MAINTAINER [email protected]
RUN DEBIAN_FRONTEND=noninteractive

RUN apt-get update --fix-missing && apt-get install -y
RUN apt install software-properties-common  -y
RUN add-apt-repository ppa:deadsnakes/ppa 
RUN apt update
RUN apt -y install python3.10
RUN apt install python3-pip -y
RUN \
      apt-get update && apt-get install --no-install-recommends -y \
      git \
      cmake \
      build-essential \
      vim \
      supervisor \
      libpcre2-dev \
      libpcre3-dev \
      pkg-config \
      libavl-dev \
      libev-dev \
      libprotobuf-c-dev \
      protobuf-c-compiler \
      libssh-dev \
      libssl-dev \
      swig \
      python3-dev \
	  libpam-dev \
	  iputils-* \
	  libcunit1 \
	  libcunit1-dev \
	  wget \
	  ninja-build \
	  gperf \
	  gcc-multilib \
	  g++-multilib \
	  libconfig-dev \
	  tcpdump \
	  autotools-dev \
	  autoconf \
	  automake \
	  libtool
	  
# add netconf user
RUN \
    adduser --system netconf && \
    echo "netconf:netconf" | chpasswd

RUN mkdir /opt/dev
WORKDIR /opt/dev

# libyang
RUN \
      git clone https://github.com/CESNET/libyang.git && \
      cd libyang && mkdir build && cd build && \
      cmake .. && \
      make && \
      make install && \
	  ldconfig
	  
# libnetconf2
RUN \
      git clone https://github.com/CESNET/libnetconf2.git && \
      cd libnetconf2 && mkdir build && cd build && \
      cmake .. && \
	  make && \
	  make install && \
	  ldconfig

# sysrepo
RUN \
      git clone https://github.com/sysrepo/sysrepo.git && \
      cd sysrepo && mkdir build && cd build && \
      cmake .. && \
      make && \
      make install && \
	  ldconfig

# netopeer2
RUN \
	  git clone https://github.com/CESNET/netopeer2.git && \
      cd netopeer2 && mkdir build && cd build && \
      cmake INSTALL_MODULES:ON GENERATE_HOSTKEY:ON .. && \
      make && \
      make install 

ENV SRC_PATH /home/netconf/
WORKDIR $SRC_PATH

RUN \
	git clone https://github.com/eriptic/uoscore-uedhoc && \      #oscore client and server uoscore compiled for 64bits (Makefile) --> libtool
	cd uoscore-uedhoc && \
	git submodule update --init --recursive && \
	cd externals/mbedtls/ && \
	make install && \
	cd ../.. && \
	make
RUN \
	git clone https://github.com/obgm/libcoap && \
	cd libcoap && \
	./autogen.sh && \
	./configure --disable-doxygen --disable-manpages && \
	make && \
	make install

RUN set -e -x; cd /home/netconf/; mkdir cfgoscore; cd cfgoscore
ENV SRC_PATH /home/netconf/cfgoscore/ietf-oscore
WORKDIR $SRC_PATH

RUN apt-get -y install nginx
RUN echo "Dockerfile Test on Nginx" > /var/www/html/index.html

EXPOSE 830
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
COPY misc/supervisord.conf /etc/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

Tag summary

Content type

Image

Digest

sha256:f4e765e98

Size

648.6 MB

Last updated

over 3 years ago

docker pull gabilm/sdn-iot-oscore_node:1.6