version: "3.0" networks: network: driver: bridge ipam: config: - subnet: 172.20.0.0/12 services: wireguard: build: . image: wg-docker/alpine:0.0.1 container_name: wg_docker_container hostname: wg_docker_container restart: unless-stopped ports: - 51820:51820/udp cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.src_valid_mark=1 volumes: - /lib/modules:/lib/modules - ./authorized_keys:/root/.ssh/authorized_keys - /etc/wireguard/wg0.conf:/etc/wireguard/wg0.conf