Added a full test between openconnect and ocserv based on docker.

That allows testing the establishment of a connection plus
the transferring of packets.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-04-17 15:23:17 +02:00
parent 62110975a7
commit 7bf24821ae
10 changed files with 639 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
FROM tianon/debian:jessie
RUN apt-get update
RUN apt-get install -y libgnutls28
RUN apt-get install -y libwrap0 libpam0g libseccomp2 libdbus-1-3 libreadline5 libnl-route-3-200
RUN apt-get install -y libprotobuf-c0 libhttp-parser2.1 libpcl1 libopts25 autogen
RUN apt-get install -y libsystemd-daemon0 valgrind nuttcp openssh-server bash
RUN echo 'root:root' |chpasswd
RUN useradd -m -d /home/admin -s /bin/bash admin
RUN echo 'admin:admin' |chpasswd
EXPOSE 5000
EXPOSE 5000/udp
EXPOSE 5001
EXPOSE 5001/udp
EXPOSE 5551
EXPOSE 5551/udp
EXPOSE 22
RUN mkdir /etc/ocserv
ADD key.pem /etc/ocserv/
ADD cert.pem /etc/ocserv/
ADD ocserv.conf /etc/ocserv/
ADD passwd /etc/ocserv/
ADD ocserv /usr/sbin/
ADD ocpasswd /usr/bin/
ADD occtl /usr/bin/
# It's not possible to use mknod inside a container with the default LXC
# template, so we untar it from this archive.
ADD dev-tun.tgz /dev/
CMD nuttcp -S;/etc/init.d/ssh restart;/usr/sbin/ocserv -d 1 -f