mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
FROM debian:testing
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install -y libgnutls-deb0-28 libprotobuf-c1 liboath0 libev4
|
|
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
|
|
RUN apt-get install -y libsystemd0 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
|