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: ${CONTAINER_NAME} hostname: ${CONTAINER_NAME} restart: unless-stopped ports: - ${WG_PORT}:${WG_PORT}/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 - ${WG0_CONF}:/etc/wireguard/wg0.conf