Opslag

Viser opslag fra oktober, 2018

Pi-Hole Docker Image on Raspberry Pi

Billede
Flash your Raspbbery Pi with: Hypriot OS https://blog.hypriot.com/downloads/ Boot the Raspberry, and login with The default credentials using PuTTY user: pirate password: hypriot. Run the following commands to disable the listener on port53 sudo systemctl disable systemd-resolved.service  sudo service systemd-resolved stop Run the following to install Pi-Hole: docker pull pihole/pihole Run the following to start Pi-Hole: IP_LOOKUP= " $( ip route get 8.8.8.8 | awk ' { print $NF; exit } ' ) " # May not work for VPN / tun0 IPv6_LOOKUP= " $( ip -6 route get 2001:4860:4860::8888 | awk ' {for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)} ' ) " # May not work for VPN / tun0 IP= " ${IP :- $IP_LOOKUP } " # use $IP, if set, otherwise IP_LOOKUP IPv6= " ${IPv6 :- $IPv6_LOOKUP } " # use $IPv6, if set, otherwise IP_LOOKUP DOCKER_CONFIGS= " $( pwd ) " # Default of directory you run

Docker

List all containers (only IDs) docker ps -aq Stop all running containers docker stop $(docker ps -aq) Remove all containers docker rm $(docker ps -aq) Restart container docker restart [OPTIONS] CONTAINER [CONTAINER...] Restart container docker rmi $(docker images -q)