Last active
August 29, 2015 14:05
-
-
Save Aricg/5fd950c2d5846e2c1a66 to your computer and use it in GitHub Desktop.
Netopeer-sl Docker image, centos6
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 centos:centos6 | |
| run yum -y update | |
| RUN yum -y install libxml2 libssh2-devel dbus-devel doxygen libcurl-devel git readline-devel gcc gcc-c++ make libxml2-devel libxslt-devel openssh-server libtool | |
| 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 libtool --finish /usr/local/lib | |
| run ln -s /usr/local/lib/libnetconf.so.0 /lib | |
| ADD libevent2-devel-2.0.18-1.el6.x86_64.rpm /libevent2-devel-2.0.18-1.el6.x86_64.rpm | |
| ADD libevent2-2.0.18-1.el6.x86_64.rpm /libevent2-2.0.18-1.el6.x86_64.rpm | |
| RUN cd / && rpm -i libevent2-2.0.18-1.el6.x86_64.rpm | |
| RUN cd / && rpm -i libevent2-devel-2.0.18-1.el6.x86_64.rpm | |
| #RUN yum -y remove libevent-devel-1.4.13-4.el6.x86_64 || true | |
| RUN ln -s /opt/libevent2/usr/lib64/libevent.so /lib64/ | |
| RUN ldconfig | |
| #ENV LIBNETCONF_LIBS "/usr/local/lib/libnetconf.so.0" | |
| #ENV LIBNETCONF_CFLAGS "-g -O2" | |
| RUN cd /netopeer/server-sl && CPPFLAGS="-I/opt/libevent2/usr/include/event2 -I/opt/libevent2/usr/include/" ./configure && make && make install | |
| RUN libtool --finish /usr/local/lib | |
| #The sshd subsystem does not work in centos6 | |
| #RUN mkdir /var/run/sshd | |
| #RUN echo "root:password" | chpasswd | |
| # | |
| #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 | |
| ## | |
| #RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' | |
| #RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' | |
| ##RUN ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' | |
| # | |
| #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