Hypriot Docker and remote access

Hypriot offers an Raspberry Pi image to run docker.

However, by default docker doesn't listen on a network port which would allow to conveniently run docker commands from another host.

1. Make docker listen on network interface

Find and replace the following line:

# Old:
ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS
# New:
ExecStart=/usr/bin/docker daemon -H tcp:// $DOCKER_OPTS

Either restart docker (sudo service docker restart) or your Pi.

1.1. Remote docker run

Now you can run docker build and docker run on another computer with DOCKER_HOST=%IP_OF_HYPRIOT%:2375 set.

DOCKER_HOST= docker run -it --rm ubuntu:14.04 /bin/echo "Hello world"