diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-03-24 14:49:46 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-03-24 14:49:46 +0100 |
| commit | 9f44f46a4cbf6857560acf567e2c0e93bd39012d (patch) | |
| tree | 2fa74e3f2dbf712497daca90a21f6f54be62d485 /ci/docker/eduvpn-server.docker | |
| parent | 920aa02f020c348ddfc3dd1c31684fcc5d386897 (diff) | |
Add CI docker images for testing with the server
Diffstat (limited to 'ci/docker/eduvpn-server.docker')
| -rw-r--r-- | ci/docker/eduvpn-server.docker | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/ci/docker/eduvpn-server.docker b/ci/docker/eduvpn-server.docker new file mode 100644 index 0000000..b1e2c70 --- /dev/null +++ b/ci/docker/eduvpn-server.docker @@ -0,0 +1,65 @@ +FROM fedora:36 + +RUN dnf -y install git + +WORKDIR /eduvpn + +RUN git clone https://github.com/eduvpn/documentation + +WORKDIR /eduvpn/documentation + +RUN git checkout v3 + +RUN echo -e '[eduVPN_v3-dev]\n\ +name=eduVPN 3.x Development Packages (Fedora $releasever)\n\ +baseurl=https://repo.tuxed.net/eduVPN/v3-dev/rpm/fedora-$releasever-$basearch\n\ +gpgcheck=1\n\ +gpgkey=https://repo.tuxed.net/fkooman+repo@tuxed.net.asc\n\ +enabled=1'\ +>> /etc/yum.repos.d/eduVPN_v3-dev.repo + +RUN cat /etc/yum.repos.d/eduVPN_v3-dev.repo + +RUN dnf -y install mod_ssl php-opcache httpd iptables-nft pwgen cronie \ + iptables-services php-fpm php-cli policycoreutils-python-utils chrony \ + ipcalc tmux wget iproute + +RUN dnf -y install vpn-server-node vpn-user-portal vpn-maint-scripts + +ARG WEB_FQDN=eduvpnserver + +RUN cp resources/ssl.fedora.conf /etc/httpd/conf.d/ssl.conf +RUN cp resources/localhost.fedora.conf /etc/httpd/conf.d/localhost.conf +RUN cp resources/vpn.example.fedora.conf "/etc/httpd/conf.d/${WEB_FQDN}.conf" + +RUN sed -i "s/vpn.example/${WEB_FQDN}/" "/etc/httpd/conf.d/${WEB_FQDN}.conf" + +RUN sed -i "s/vpn.example/${WEB_FQDN}/" "/etc/vpn-user-portal/config.php" + +RUN sed -i "s|10.42.42.0|$(ipcalc -4 -r 24 -n --no-decorate)|" "/etc/vpn-user-portal/config.php" +RUN sed -i "s|fd42::|$(ipcalc -6 -r 64 -n --no-decorate)|" "/etc/vpn-user-portal/config.php" +RUN sed -i "s|10.43.43.0|$(ipcalc -4 -r 24 -n --no-decorate)|" "/etc/vpn-user-portal/config.php" +RUN sed -i "s|fd43::|$(ipcalc -6 -r 64 -n --no-decorate)|" "/etc/vpn-user-portal/config.php" + +RUN cp /etc/vpn-user-portal/keys/node.0.key /etc/vpn-server-node/keys/node.key + +RUN openssl req \ + -nodes \ + -subj "/CN=${WEB_FQDN}" \ + -x509 \ + -sha256 \ + -newkey rsa:2048 \ + -keyout "/etc/pki/tls/private/${WEB_FQDN}.key" \ + -out "/etc/pki/tls/certs/${WEB_FQDN}.crt" \ + -days 90 + +WORKDIR /eduvpn/server +ADD ci/docker/starteduvpn.sh /eduvpn/server + +RUN chmod +x ./starteduvpn.sh + +RUN wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl3.py -O /bin/systemctl + +RUN chmod +x /bin/systemctl + +CMD ["./starteduvpn.sh"] |
