# Trouble getting docker based pi-hole to work

**URL:** https://discourse.pi-hole.net/t/trouble-getting-docker-based-pi-hole-to-work/795
**Category:** Help
**Created:** [December 7, 2016, 2:04pm UTC](https://discourse.pi-hole.net/t/trouble-getting-docker-based-pi-hole-to-work/795 "2016-12-07T14:04:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jtenniswood](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jtenniswood/32/283_2.png) [@jtenniswood](https://discourse.pi-hole.net/u/jtenniswood)
#### Post date: [December 7, 2016, 2:04pm UTC](https://discourse.pi-hole.net/t/trouble-getting-docker-based-pi-hole-to-work/795/1 "2016-12-07T14:04:45Z")

</div>

Hi  
Just trying to setup PiHole within docker.  
I've used this script...

```
#!/bin/bash
IMAGE=${1:-'diginc/pi-hole:alpine'}
NIC=${2:-'ens160'}
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"

```

Its running on ubuntu, within its own VM, under vmware 6.5.  
In the logs I see...

```
==> /var/log/nginx/error.log <==
2016/12/07 10:15:53 [error] 304#304: *3 FastCGI sent in stderr: "PHP message: PHP Warning: max(): Array must contain at least one element in /var/www/html/admin/data.php on line 256
PHP message: PHP Warning: min(): Array must contain at least one element in /var/www/html/admin/data.php on line 257
PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/admin/data.php on line 263" while reading response header from upstream, client: 192.168.30.20, server: , request: "GET /admin/api.php?overTimeData HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.20.193", referrer: "http://192.168.20.193/admin/"

```

The admin screen comes up but just spins the refresh animation, the dns doesn't work with a client machine when I've tried.

Not really sure what to do next?

---

<div class="post-metadata">

### Author: ![diginc](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/diginc/32/96_2.png) [@diginc](https://discourse.pi-hole.net/u/diginc)
#### Post date: [January 23, 2017, 5:43pm UTC](https://discourse.pi-hole.net/t/trouble-getting-docker-based-pi-hole-to-work/795/2 "2017-01-23T17:43:45Z")

</div>

Was your issue resolved through github? It sounds familiar.

`min(): Array must contain at least one element in`  
this happens when your dnsmasq log is empty I believe.

If you're running a brand new container without every querying it it would make sense the log is empty, until you point your clients / router at the pi-hole dnsmasq.

edit: I don't think this is an issue in the new version anymore.
