2019-11-25 16:28:37 +00:00
|
|
|
# needs at least docker-compose 1.18.0 (1.10.0 for sysctls option and 1.18.0 for custom network name)
|
|
|
|
version: "2.1"
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
vpn-client:
|
|
|
|
image: vpn-client:$VERSION_VPN_CLIENT
|
|
|
|
build: "https://git.scimetis.net/yohan/docker-VPN-client.git"
|
|
|
|
restart: always
|
|
|
|
volumes:
|
2019-12-12 17:50:01 +00:00
|
|
|
- ./keys:/etc/openvpn/client:Z
|
|
|
|
- ./client.conf:/etc/openvpn/openvpn.conf:Z
|
2019-11-25 16:28:37 +00:00
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
sysctls:
|
|
|
|
net.ipv4.ip_forward: 1
|
|
|
|
devices:
|
|
|
|
- "/dev/net/tun:/dev/net/tun"
|
|
|
|
dns: 80.67.169.12
|
|
|
|
networks:
|
2019-12-12 17:50:01 +00:00
|
|
|
openvpn-network:
|
2019-11-25 16:28:37 +00:00
|
|
|
ipv4_address: 172.31.1.2
|
|
|
|
|
|
|
|
networks:
|
2019-12-12 17:50:01 +00:00
|
|
|
openvpn-network:
|
|
|
|
name: openvpn-network
|
2019-11-25 16:28:37 +00:00
|
|
|
ipam:
|
|
|
|
config:
|
|
|
|
- subnet: 172.31.1.0/24
|
|
|
|
|