coreos/discovery.etcd.io — pull request #19 by visualphoenix (2014-10-17 21:28:13+00:00)
Title: add Dockerfile

```
docker build -t discovery .
```

assuming etcd is running in another container, but exposing 4001 and 7001 publicly:

```
PUBLIC_IP=$(ip addr show eth0 | awk 'NR==3{print $2}' | awk -F'/' '{print $1}')
docker run -d -p 80:8087 -e DISCOVERY_ROOT_URL=http://$(hostname -f):4001/v2/keys/_etcd/registry/ -e DISCOVERY_ORIGIN_ADDR=http://$PUBLIC_IP:4001 -e DISCOVERY_INIT_LEADER=$PUBLIC_IP:7001 $IMAGE
```

then you can run:

```
curl localhost/new
```