[Unit]
Description=agentcage DNS sidecar

[Container]
ContainerName={{ name }}-dns
Image=localhost/agentcage-dns
Network={{ name }}-net.network:ip=10.89.0.10
Network=podman
AddCapability=NET_BIND_SERVICE
Exec=dnsmasq --no-daemon{% if log_dns_queries %} --log-queries{% endif %} --no-resolv{% for srv in dns_servers %} --server {{ srv }}{% endfor %}{% if dns_allowlist %} --address=/#/198.51.100.1{% for domain in dns_allowlist %}{% for srv in dns_servers %} --server=/{{ domain }}/{{ srv }}{% endfor %}{% endfor %}{% endif %}


[Service]
Restart=on-failure

[Install]
WantedBy=default.target
