Files
ocserv/tests/docker-ocserv/Dockerfile-debian-proxyproto
Nikos Mavrogiannopoulos 8ed48a14bb tests: check whether IPs are being passed correctly to script when in proxyproto
That is check whether the remote IP passed is other than localhost,
and there is a non-empty IP_REAL_LOCAL.
2015-08-22 20:13:46 +02:00

36 lines
1.3 KiB
Plaintext

FROM debian:jessie
RUN apt-get update
RUN apt-get install -y libgnutls-deb0-28 libprotobuf-c1
RUN apt-get install -y libwrap0 libpam0g libseccomp2 libdbus-1-3 libreadline5 libnl-route-3-200
RUN apt-get install -y libhttp-parser2.1 libpcl1 libopts25 autogen
RUN apt-get install -y libsystemd-daemon0 valgrind nuttcp openssh-server bash
RUN apt-get install -y libtalloc2 liblz4-1 libkrb5-3 less haproxy
RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/g' -i /etc/ssh/sshd_config
RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/g' -i /etc/ssh/sshd_config
RUN echo 'root:root' |chpasswd
RUN useradd -m -d /home/admin -s /bin/bash admin
RUN echo 'admin:admin' |chpasswd
RUN mkdir /etc/ocserv
ADD key.pem /etc/ocserv/
ADD cert.pem /etc/ocserv/
ADD combo.pem /etc/ocserv/
ADD haproxy-proxyproto.cfg /etc/haproxy/haproxy.cfg
ADD ocserv-proxyproto.conf /etc/ocserv/ocserv.conf
ADD passwd /etc/ocserv/
ADD ocserv /usr/sbin/
ADD ocpasswd /usr/bin/
ADD occtl /usr/bin/
ADD myscript /usr/bin/
ADD proxy-connectscript /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;mkdir -p /tmp/disconnect/;mkdir -p /tmp/connect;/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg;/usr/sbin/ocserv -d 1 -f;sleep 3600