1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-29 12:41:00 +02:00
docker-pi-hole/docker_run.sh
diginc 21eee5a0ca Shellcheck added to py.test and fixes
- Various minor quote fixes
- Optimized repeated echos into php conf for alpine
2016-10-08 14:56:06 -05:00

12 lines
313 B
Bash
Executable File

#!/bin/bash
IMAGE=${1:-'diginc/pi-hole:alpine'}
NIC=${2:-'eth0'}
IP=$(ip addr show "$NIC" | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
# Default ports + daemonized docker container
docker run -p 53:53/tcp -p 53:53/udp -p 80:80 \
--cap-add=NET_ADMIN \
-e ServerIP="$IP" \
--name pihole \
-d "$IMAGE"