mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
FROM fedora:23
|
|
|
|
RUN yum install -y gnutls gnutls-utils protobuf-c iproute pcllib http-parser tcp_wrappers pam systemd libseccomp
|
|
RUN yum install -y libnl3 libtalloc freeradius-client lz4 radcli liboauth oathtool procps-ng iputils krb5-libs less bash openssh-server nuttcp libev
|
|
RUN systemctl enable sshd
|
|
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 ocserv-otp.conf /etc/ocserv/ocserv.conf
|
|
ADD passwd /etc/ocserv/
|
|
ADD users2.oath /etc/ocserv/users.oath
|
|
ADD ocserv /usr/sbin/
|
|
ADD ocpasswd /usr/bin/
|
|
ADD occtl /usr/bin/
|
|
ADD myscript /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;sshd-keygen;/usr/sbin/sshd;mkdir -p /tmp/disconnect/;usr/sbin/ocserv -d 1 -f;sleep 3600
|