Skip to content

Instantly share code, notes, and snippets.

@dragolabs
Created November 27, 2020 11:48
Show Gist options
  • Save dragolabs/fd72850b8cf384e2a7d308c2ef327fac to your computer and use it in GitHub Desktop.
Save dragolabs/fd72850b8cf384e2a7d308c2ef327fac to your computer and use it in GitHub Desktop.
AfGuard Home docker compose
version: '3.7'
services:
adguard-home:
container_name: adguard-home
image: adguard/adguardhome:v0.104.1
restart: always
cap_add:
- NET_ADMIN
volumes:
- adguard-work:/opt/adguardhome/work
- adguard-conf:/opt/adguardhome/conf
ports:
- 53:53/tcp
- 53:53/udp
- 67:67/udp
- 68:68/tcp
- 68:68/udp
- 80:80/tcp
- 443:443/tcp
- 853:853/tcp
- 3000:3000/tcp
volumes:
adguard-work:
external: true
name: adguard-work
adguard-conf:
external: true
name: adguard-conf
#!/usr/bin/env bash
# Create volumes
docker volume create adguard-work
docker volume create adguard-conf
# Set adguard service as default 53 DNS service on host
sudo mkdir -vf /etc/systemd/resolved.conf.d
echo "[Resolve]
DNS=127.0.0.1
DNSStubListener=no" > /etc/systemd/resolved.conf.d/adguardhome.conf
sudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl reload-or-restart systemd-resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment