FROM alpine:edge LABEL maintainer="Kirillius Labutin " ENV container=docker RUN apk --update add openrc openvpn frr php easy-rsa nano RUN echo 'rc_cgroups_enabled="NO"' >> /etc/rc.conf RUN echo 'rc_provide="loopback net"' >> /etc/rc.conf RUN rm /etc/init.d/loopback /etc/init.d/networking /etc/init.d/machine-id /etc/init.d/hwdrivers RUN openrc RUN ln -s /data/pki /etc/openvpn/keys COPY connect.php /etc/openvpn/connect.php RUN chmod +x /etc/openvpn/connect.php COPY openvpn.conf /data/openvpn.conf RUN ln -s /data/openvpn.conf /etc/openvpn/openvpn.conf COPY vars /usr/share/easy-rsa COPY client-config-template.conf /data/client-config-template.conf COPY build-client-config.php /usr/bin/build-client-config RUN sed -i 's/^tty/#&/' /etc/inittab RUN chmod +x /usr/bin/build-client-config RUN mv /etc/frr /data/frr RUN ln -s /data/frr /etc/frr RUN sed -i 's#/etc/frr#/data/frr#g' /etc/init.d/frr ENTRYPOINT ["/sbin/init"]