How to start a consul client running in a docker container?
<p><strong>Update:</strong> I overlooked the progrium/consul page on dockerhub which had the solution to my question.</p>

<p><strong>Question:</strong></p>

<p>So I am running consul in the progrium/consul container.  I am running 3 servers joined together and would like to add some consul clients.  However I have not been able to find any guides that detail how to start consul clients using the progrium/consul container.  Here is my current attempt to start a client:</p>

<p>Note that $CLIENT_IP_ADDR is my clients IP address and $CONSUL_SERVER0, $CONSUL_SERVER1 and $CONSUL_SERVER2 are the IP addresses of my consul servers.</p>

<pre><code>docker run -d -h client0 --name client0 -v /mnt:/data \
-p $CLIENT_IP_ADDR:8300:8300 \
-p $CLIENT_IP_ADDR:8301:8301 \
-p $CLIENT_IP_ADDR:8301:8301/udp \
-p $CLIENT_IP_ADDR:8302:8302 \
-p $CLIENT_IP_ADDR:8302:8302/udp \
-p $CLIENT_IP_ADDR:8400:8400 \
-p $CLIENT_IP_ADDR:8500:8500 \
-p 172.17.0.1:53:53/udp \
progrium/consul -client -advertise $CLIENT_IP_ADDR \
-join $CONSUL_SERVER0 -join $CONSUL_SERVER1 -join $CONSUL_SERVER2
</code></pre>

<p>Here are the error messages I get when I check the logs for my container:</p>

<pre><code>myUserName@myHostName:~$ docker logs client0
==&gt; WARNING: It is highly recommended to set GOMAXPROCS higher than 1
==&gt; Starting Consul agent...
==&gt; Error starting RPC listener: listen tcp $CLIENT_IP_ADDR:8400: bind: cannot assign requested address
</code></pre>