There are some big security concerns that you’ll need to consider, but are not impossible to deal with. On a Ubuntu 14.04 I found numerous references, but only one that actually worked for my configuration.
sudo vi /etc/init/docker.conf
Look for the following lines.
modify these in /etc/default/$UPSTART_JOB (/etc/default/docker)
Update the to…
DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock"
This will allow you to access the remote api via rest call directly from the box. If you want to open things up some more read up on the authentication methods that are available and then change the tcp://ADDRESS accordingly. Don’t forget to put in the unix:///var/run/docker.sock or you will not be able to access docker via the command line.
On later versions of Ubuntu things change a bit from what I’ve seen, but for 14.04 this worked for me.