Initial commit

This commit is contained in:
nemunaire 2025-07-18 16:04:27 +02:00
commit 5ba8d0df1c
3 changed files with 34 additions and 0 deletions

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM alpine:3
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/openvpn", "--cd", "/etc/openvpn", "--config", "fdn.ovpn"]
RUN apk --no-cache add openvpn
RUN wget -O /etc/openvpn/fdn.ovpn https://git.fdn.fr/fdn-public/wiki/-/raw/master/vpn/openvpn/client/configuration/fdn-vpn.ovpn && sed -i 's@^auth-user-pass.*$@auth-user-pass fdn-pass.txt@' /etc/openvpn/fdn.ovpn
COPY entrypoint.sh /docker-entrypoint.sh

17
README.md Normal file
View file

@ -0,0 +1,17 @@
OpenVPN client for FDN VPN
==========================
You can use this container to join the FDN VPN inside a container.
Basic usage:
```
read -s -p "VPN Password: " VPN_PASSWORD; export VPN_PASSWORD="${VPN_PASSWORD}"
docker run --name fdn-router --rm --cap-add NET_ADMIN -e VPN_USERNAME=username@vpn.fdn.fr -e VPN_PASSWORD --device /dev/net/tun:/dev/net/tun nemunaire/openvpn-fdn
```
You can then create futher containers in the same network stack:
```
docker run --rm -it --network container:fdn-router alpine
```

8
entrypoint.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
cat <<EOF > /etc/openvpn/fdn-pass.txt
${VPN_USERNAME}
${VPN_PASSWORD}
EOF
exec $@