feat: enable proper systemd support in Docker tests (#1373)

- Replace the `sed` hack that disabled `systemctl` commands with proper
systemd support in Docker containers
- This allows testing the actual `systemctl` commands used by the
install script
- No more manual workarounds for starting OpenVPN/Unbound services
This commit is contained in:
Stanislas
2025-12-13 01:14:54 +01:00
committed by GitHub
parent 236e77af68
commit 9e1bb4b175
4 changed files with 118 additions and 83 deletions

View File

@@ -8,17 +8,22 @@ services:
BASE_IMAGE: ${BASE_IMAGE:-ubuntu:24.04}
container_name: openvpn-server
hostname: openvpn-server
cap_add:
- NET_ADMIN
privileged: true
cgroupns: host
devices:
- /dev/net/tun:/dev/net/tun
sysctls:
- net.ipv4.ip_forward=1
volumes:
- shared-config:/shared
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /run
- /run/lock
networks:
vpn-test:
ipv4_address: 172.28.0.10
stop_signal: SIGRTMIN+3
healthcheck:
test: ["CMD", "pgrep", "openvpn"]
interval: 5s