Last active
August 29, 2015 14:05
-
-
Save Aricg/4f20dc799a76652b9143 to your computer and use it in GitHub Desktop.
Docker file for netopeer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ubuntu:latest | |
run apt-get update | |
run apt-get install -y libxml2 libssh2-1 libdbus-1-dev doxygen libcurl4-gnutls-dev git libreadline-dev build-essential checkinstall libxml2-dev libxslt1-dev libssh2-1-dev libevent-dev openssh-server | |
run git clone https://code.google.com/p/libnetconf/ | |
run git clone https://code.google.com/p/netopeer/ | |
run cd /libnetconf && ./configure --with-nacm-recovery-uid=0 | |
run true | |
run cd /libnetconf && sed -i "/cd dev-tools\/lncdatastore/ s/$/ CPPFLAGS='\$(CPPFLAGS)' CFLAGS='\$(CFLAGS)'/" Makefile | |
run cd /libnetconf && make && make install | |
run cd /netopeer/server-sl && ./configure && make && make install | |
run ln -s /usr/local/lib/libnetconf.so.0 /lib | |
RUN mkdir /var/run/sshd | |
RUN echo "root\nroot" > /password | |
RUN cat /password | passwd | |
RUN echo 'Port 830' >> /etc/ssh/sshd_config | |
RUN echo 'Subsystem netconf /usr/local/bin/netopeer-server-sl' >> /etc/ssh/sshd_config | |
RUN sed -i -Ee "s,PermitRootLogin.*,PermitRootLogin yes," /etc/ssh/sshd_config | |
CMD /usr/sbin/sshd -d | |
EXPOSE 830 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment